views:

402

answers:

2

I have Implemented one web service that return xml string.

I want to validate that web service through the hash code, when request is coming from any URL then validate that URL is valid or not how this will done through the c# code?

The XML web service will require that a valid HASH code is submitted to the API along with validating the URL the request is made from.

A: 

Possibly you can check the HttpRequest.Url.Referrer and ping the referrer. if it returns then you can be sure that the referrer url is valid. Though, I am not sure how you ping.

24x7Programmer
A: 

Many of us want ot secure the calls to our web services, right?

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

Using this method we simply add a required SOAP header to our web services calls.

We embed the SOAP header into our message and validate its contents on the server.

If the SOAP header validation done successfully, the web server sends the web service response to the consumer.

avinash