Disable proxy for entire application?

Posted by Brent on Stack Overflow See other posts from Stack Overflow or by Brent
Published on 2010-04-17T03:22:13Z Indexed on 2010/04/17 3:33 UTC
Read the original article Hit count: 342

Ever since upgrading to Visual Studio 2010, I'm running into an issue where the first web request of any type (WebRequest, WebClient, etc.) hangs for about 20 seconds before completing. Subsequent calls work quickly. I've narrowed down the problem to a proxy issue.

If I manually disable proxy settings, I don't experience this delay:

Dim wrq As WebRequest = WebRequest.Create(Url)
wrq.Proxy = Nothing

What's strange is that there are no proxy settings enabled on this machine in Internet Options. What I'm wondering is if there is a way to disable proxy settings for my entire project in one shot without explicitly disabling as above for every web object.

The main reason I want to be able to do this is that I'm trying to use an API (http://code.google.com/p/google-api-for-dotnet/) which uses web requests, but does not provide any way to manually disable proxy settings.

I have found some information suggesting that I need to add some proxy information to the app.config file, but I get errors building my program if I make an edits to that file.

Can anyone point me in the right direction?

© Stack Overflow or respective owner

Related posts about vb.net

Related posts about web-services