In debugging some web service wierdness I downloaded Fiddler. Fiddler is an excellent tool for viewing and experimenting with the HTTP headers and payload exchanged between client and server. I've never used a debugging proxy that is so easy and informative.
Any software using the WinINET API (like IE) will automatically send traffic through fiddler when the “Act as System Proxy” check box is checked.
For the .NET classes like HttpWebRequest and WebClient, I found the GlobalProxySelection class is pretty useful for setting the proxy programatically:
GlobalProxySelection.Select = new WebProxy("127.0.0.1", 8888);
Before yesterday I didn't know this class existed. It's amazing what I can find when I venture outside of my “framework comfort zone”.
Comments
<br>
<br>
<br>AHA, Ben
To be sure though use the machine name as Eric recommends - the NetBios name should always work.
Note this can be turned off in Web.Config and in fact in Web applications, especially local ones you probably want to turn the auto-proxy off.
http://west-wind.com/weblog/posts/3871.aspx