I need to add a functionality in an application (C#) which will use a web service (XML SOAP service).
Now this application can (and mostly) be used in an corporate environment which has a proxy server in place.
I understand the SOAP services use HTTP protocol and hence should use port 80, which is normally kept opened. Is it right that application can use web service without any special coding or I will need to write special code to detect proxy settings or some other issues you see?
EDIT: Webservice is a publicly available service on internet. Its not on same network.
It will use port 80 by default, and you shouldn't have to do any further coding.
If you do need to go through a proxy of some sort, all you need to do is add the following to your web.config:
<system.net>
<defaultProxy>
<proxy proxyaddress="http://yourproxyserver:80" />
</defaultProxy>
</system.net>
You could also do it through code using this:
WebRequest.DefaultWebProxy = new WebProxy("http://yourproxyserver:80/",true);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With