Rectangle 27 0

c Unable to connect to the remote server?


<configuration>
  <system.net>
    <defaultProxy>
      <proxy proxyaddress ="http://contoso:8080" />
    </defaultProxy>
  </system.net>
</configuration>
<configuration>
  <system.net>
    <defaultProxy>
      <proxy scriptLocation="http://pac.MyDomain.com/" />
    </defaultProxy>
  </system.net>
</configuration>

I had this very problem and finally found a solution. I had to add a configuration to the web.config to tell it where to find the default proxy. This is because the client ID that my app pool is using doesn't have security rights to find it on the system that it is running on. So, it's trying to go to the url directly rather than being routed through the proxy thereby preventing it from connecting. In my situation, our IIS server uses a script for it's proxy but this is also the solution needed if you have a proxy server.

There are other options with the proxy element that may help you as well including: bypasslocal and usesystemdefault but I'm not entirely sure what they do.

Note