A
Andrew Brook
Hi everyone,
I'm confused at the moment by a proxy. Here's my scenario.
Using .NET 2.0, when I create a HttpWebRequest I do not need to set the
proxy property because by default it seems to use the same proxy that IE
uses, I do however need to set the credentials to use the default credential
because this does not happen automatically. When I do this, everything works
as planned because I recieve the expected response and not a 407. If i take
out the credentials assignment then I recieve my 407. I'm happy with this.
The only query I have here is is there any way to see the values of the
default proxy at this stage? The HttpWebRequest.Proxy property is of type
WebProxyWrapper and doesn't really expose any information that i can see and
feel happy with.
When it comes to adding a web reference to one of my own web services, if I
don't set the proxy property of the SoapHttpClientProtocol object then the
proxy is bypassed (opposite of the above behaviour) as no default value is
used. Also, say I now want to set the webservice client to use the default
proxy, the documentation suggests the way to do this is to just create a new
WebProxy and that will have the default settings, but when I do this, the
webservice works like it is still bypassing the proxy (i don't get a 407).
So it looks to me like in that instance, the new WebProxy does not contain
the proxy values at all.
Hopefully someone who knows more about the .NET framework and using proxies
will be able to help clarify my situation, I appreciated there is a lot of
rant here so please shout up for more info if required.
thanks,
Andrew
I'm confused at the moment by a proxy. Here's my scenario.
Using .NET 2.0, when I create a HttpWebRequest I do not need to set the
proxy property because by default it seems to use the same proxy that IE
uses, I do however need to set the credentials to use the default credential
because this does not happen automatically. When I do this, everything works
as planned because I recieve the expected response and not a 407. If i take
out the credentials assignment then I recieve my 407. I'm happy with this.
The only query I have here is is there any way to see the values of the
default proxy at this stage? The HttpWebRequest.Proxy property is of type
WebProxyWrapper and doesn't really expose any information that i can see and
feel happy with.
When it comes to adding a web reference to one of my own web services, if I
don't set the proxy property of the SoapHttpClientProtocol object then the
proxy is bypassed (opposite of the above behaviour) as no default value is
used. Also, say I now want to set the webservice client to use the default
proxy, the documentation suggests the way to do this is to just create a new
WebProxy and that will have the default settings, but when I do this, the
webservice works like it is still bypassing the proxy (i don't get a 407).
So it looks to me like in that instance, the new WebProxy does not contain
the proxy values at all.
Hopefully someone who knows more about the .NET framework and using proxies
will be able to help clarify my situation, I appreciated there is a lot of
rant here so please shout up for more info if required.
thanks,
Andrew