0

I was having difficulties surrounding a DownloadStringAsync call being rather slow. I found (in this question) that this is due to Automatic Proxy Detection.

Apparently, the auto detection can be turned off by setting the WebClient's Proxy property to null.

Is there any case when this could cause problems? I'm not too familiar with proxies, but if the user for some reason needs a proxy to access the web, will this fail?

Some background: this call is in an update manager. It's grabbing a file from a server I control to see whether the program needs to update. So, not completely crucial, but it would be nice to have it work for most users.

Community
  • 1
  • 1
NickAldwin
  • 11,584
  • 12
  • 52
  • 67
  • I believe this would disable your ability to debug with fiddler (or any other proxy that depends on auto configuration). – M.Babcock Jan 14 '12 at 01:04
  • @M.Babcock would it affect anything on the client side? – NickAldwin Jan 15 '12 at 20:39
  • Would it affect the messaging or behavior of your client code? No. Is that what you mean? – M.Babcock Jan 15 '12 at 20:54
  • @M.Babcock Right. Would there ever be a situation that the call would fail for a user of the program if I turned off the Automatic Proxy Detection? – NickAldwin Jan 16 '12 at 03:57
  • The only reason I can think of is if there is local domain policy requiring use of a specific proxy. It could be required other ways though. – M.Babcock Jan 16 '12 at 03:58

1 Answers1

0

If you are writing an app that is supposed to run in all environments, then do not switch off autoproxy detection. Otherwise you are opening yourself up to support calls.

Instead, ship with autoproxy detection on by default, and allow the users to change that, to use an explicit proxy, or disable proxy if they so want.

look at the Internet Explorer connection settings UI for an example.

feroze
  • 7,380
  • 7
  • 40
  • 57