Client is getting one of the following error messages with a WebException (these errors may not be exact quotes):
- “The connection was refused by the remote host.”
- “The request timed out while waiting for a response.”
- “For security reasons DTD is prohibited in this XML document. To enable DTD processing, set the ProhibitDtd property on XmlReaderSettings to false and pass the settings into XmlReader.Create method.”
- Verify the HealthServiceUrl and ShellUrl in the application web.config.
Partner staging environment (not frequently used outside of Microsoft):
If you are getting the “For security reasons DTD is prohibited in this XML document” error, the most likely cause is an incorrect HealthServiceUrl. This error occurs when the response to an SDK request is HTML.
- Gather proxy server configuration (if any):
- Open Internet Explorer.
- Go to Tools>Internet Options.
- Select the Connections tab.
- Click LAN settings.
- Under Proxy server, note the Address and Port, if present.
- If proxy settings were configured, verify that those proxy settings are present in the web.config:
- Open the web.config for the application in an editor.
- Scroll down to the <system.net> section.
- Verify the <defaultProxy> element is present.
- If the <system.net> or <defaultProxy> elements are missing, add them. Place the proxy server and port settings with those retrieved in step 1. If no port, leave off the “:port” portion of the address.
<proxy usesystemdefault = "false"
- If connection errors continue to occur, other tools must be used to diagnose the problems.
- Install Fiddler v2 from
- Start Fiddler.
- Configure Fiddler to decrypt HTTPS traffic.
- In Fiddler, go to Tools>Fiddler Options.
- Select the Decrypt HTTPS traffic checkbox.
- Click OK.
- Run the scenario that causes the connection problem.
- Analyze the Fiddler logs.