![]() ![]() There seems to be some debate about whether you can set webRequest.Proxy or WebRequest.DefaultWebProxy = null to prevent the use of any proxy. (new Uri("")) to see the actual details of the proxy server that would be used. This can make things a bit confusing when debugging and checking the property of webRequest.Proxy. WebRequest.Proxy = new WebProxy(" or WebRequest.DefaultWebProxy = new WebProxy(" You should also remember the object model for proxies includes the concept that the proxy can be different depending on the destination hostname. If you wanted to use different proxy settings to the current user then you would need to code WebRequest webRequest = WebRequest.Create("") The default behaviour of WebRequest.DefaultWebProxy is to use the same underlying settings as used by Internet Explorer. If you wanted to change the proxy being used by all subsequent WebRequests, you can set this static DefaultWebProxy property. If you do not explicitly set the Proxy property on a web request it uses the value of the static WebRequest.DefaultWebProxy.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |