views:

46

answers:

2

My sharepoint webpart is throwing an error when calling HttpWebRequest.GetRequestStream when the request is made through a proxy server. The error is "unable to connect to the remote server." The client's machine (where this is failing) is set to use a specific proxy server (Use proxy server for your LAN) on IE settings.

Do I need to add any proxy setting in the config to get this to work?

Also, what's the easiest way to reproduce my client's scenario--how can I add a proxy on my end?

A: 

Check the Sharepoint log to get a detailed error description.

Usually this can be found here: C:\program files\common files\microsoft shared\web server extensions\12\LOGS\

AlvinfromDiaspar
+1  A: 

You can try to set autodetect to false in web.config

   <system.net>
      <defaultProxy>
        <proxy autoDetect="false" />
      </defaultProxy>
   </system.net>
JWL_
Do I also need to set useDefaultCredentials to false?
Prabhu
I would try both. I think I usually set that value to true in code.
JWL_