Error : Unable to connect to the remote server
I got "Unable to connect to the remote server error" when I tried to call a webservice that is hosted on some remote machine outside my firewall. I am using a proxy server, and figured it that my application is not aware of the proxy server. So I did some googling and add the following defaultproxy settings under System.net tag in applications web.config file.
<system.net> <defaultProxy useDefaultCredentials="true"> <proxy proxyaddress="http://Your Proxy Address:PortNumber" bypassonlocal="True" /> </defaultProxy> </system.net>
|useDefaultCredentials||Specifies whether the default credentials for this host are used to access the web proxy. The default value is false|
|bypassonlocal||Specifies whether the proxy is bypassed for local resources|
|proxyaddress||Specifies the proxy URI to use|
To know your proxy address,
- Open your WebBrowser and navigate to Internet Options
- Under Connections Tab, open LAN Settings and copy Address and Port no.