Is it possible in .net 2.0 to enable calling web service only from localhost and to disable calling web service from outside?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes very much, you can open the webservice to serve only the specified URLs by placing.
So that webservice will only send data to specified IP address.
In web.config under appsettings do something like below:
<appSettings><add key="YOURDOMIAN" value=""/>
<add key="YOURSCHEMAPATH" value="WebServiceConfiguration\Schemas"/>
<add key="YOURMETHODNAMEORPARAMETER" value="127.0.0.1,192.168.108.124"/>
//other stuff
In your code you can write stuff to do various checks.
Hope this helps.