If DefaultProxy address is not specified in config file, GetProxy returns unchanged URL

I found in debugger that when I am using static WebRequest.DefaultWebProxy and there is no proxy address specified in the config file,

IWebProxy.GetProxy returns the same address, as it was passed.

IWebProxy iDefaultWebProxy = WebRequest.DefaultWebProxy;

Uri uriProxy = iDefaultWebProxy.GetProxy(

I haven't seen this in documentation, but the thread confirms the behavior.

new Uri(ws.Url));
if (sProxyUrl == ws.Url)
{
//no proxy specified
 }

posted @ Wednesday, March 07, 2007 3:42 PM

Print

Comments on this entry:

# rExplicitely specify Default user credentials for Proxy Server.

Left by Michael Freidgeim at 3/9/2007 12:44 PM
Gravatar
I've created common function to set web proxy credentials SetDefaultWebProxyCredentialsIfRequired(aws);
See http://geekswithblogs.net/mnf/archive/2007/03/09/108325.aspx

Your comment:



 (will not be displayed)


 
 
 
Please add 4 and 4 and type the answer here:
 

Live Comment Preview:

 
«December»
SunMonTueWedThuFriSat
30123456
78910111213
14151617181920
21222324252627
28293031123
45678910