How does the web service confirm that the requested url is valid or not?

I have implemented one web service that returns an xml string.

I want to test this web service through a hash when the request comes from any url and then check if this url is valid or not, how would this be done with C # code?

The XML Web Service will require a valid HASH to be passed to the API along with validation of the URL from which the request was made.

0


a source to share


2 answers


Maybe you can check HttpRequest.Url.Referrer and ping referrer. if it comes back, you can be sure the referral url is valid. Although, I'm not sure how you ping.



0


a source


Many of us want to secure our web service calls, right?

There are so many ways to do this, one of them is using a custom SOAP header.

Using this method, we simply add the required SOAP header to our web service calls.



We insert the SOAP header into our message and validate its content on the server.

If validation of the SOAP header succeeds, the web server sends the web service response to the consumer.

0


a source







All Articles