Cause of error: No proxy server settings are configured, you need to do the following in the configuration section.
============================================
Article ID: 318140-View products that this article applies to.
Machine translation View machine translation Disclaimer
Step through the English Reference View machine translation for Microsoft support pages
Expand All | Close all
Collapse image This article
Collapse Image Symptoms
Note: The following. NET Framework class library namespaces are referenced in this article:
System.Net
When you use a WEB service that uses the HTTP proxy server for a. NET client, you may receive the following error message:
The underlying connection was closed: The remote name could not be resolved.
Back to Top | Provide feedback
Collapse image Reason
The HTTP Proxy Server Web service does not exist between. NET clients and the correct proxy settings have not been configured.
Back to Top | Provide feedback
Collapse Image Solution
To resolve this issue, provide the correct proxy configuration settings to the. NET client.
Back to Top | Provide feedback
Collapse image for more information
The default settings in the Machine.config file are as follows:
<configuration>
<system.net>
<defaultProxy>
<proxy
Usesystemdefault = "true"
/>
</defaultProxy>
</system.net>
</configuration>
The default setting does not automatically detect proxy settings if you set Usessystemdefault to False and then explicitly specify the proxy server. To explicitly specify a proxy server, use the Machine.config or Web. config file, or specify the server programmatically.
To specify a proxy server, set the Machine.config or Web. config file settings as follows:
<configuration>
<system.net>
<defaultProxy>
<proxy
Usesystemdefault = "false"
Proxyaddress= "Http://proxyserver"
Bypassonlocal= "true"
/>
</defaultProxy>
</system.net>
</configuration>
To programmatically change settings by using a Web proxy object, use the following code example:
Using System.Net;
Com.someserver.somewebservice.someclass MyWebServiceClass = new Com.someserver.somewebservice.someclass ();
IWebProxy proxyobject = new WebProxy ("http://myproxyserver:80", true);
Mywebserviceclass.proxy = Proxyobject;
Mywebserviceclass.mywebmethod ();
Proxy servers that require NTLM authentication
To set up a proxy server for NTML authentication, use the following code example:
Using System.Net;
WebProxy myproxy = new WebProxy ("Http://proxyserver:port", true);
Myproxy.credentials = CredentialCache.DefaultCredentials;
Findservicesoap myfindservice = new Findservicesoap ();
Myfindservice.proxy = myproxy;
You can also use system-wide proxies as default values.
<configuration>
<system.net>
<defaultProxy>
<proxy
proxyaddress = "http://proxyserver:80"
bypassonlocal = "true"/>
</defaultProxy>
</system.net>
</configuration>
Back to Top | Provide feedback
Using WebClient or HttpWebRequest: "The Remote name can ' t be solved"