VB.net, disable proxy for entire program

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:23 UTC
Read the original article Hit count: 380

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.

Can anyone point me in the right direction? Thanks!

© Stack Overflow or respective owner

Related posts about vb.net

Related posts about web-services