httpwebrequest with https behind proxy with authentication



Hi to all,
I have a problem to download a file with httpwebrequest when

_ https protocol is used
_ the client is behind a proxy that requires authentication

For example consider the following code:

WebRequest req = WebRequest.Create("https://www.domus3d.com/ws/test.txt";);
req.Proxy = new WebProxy("http://192.168.0.6:3128";, true); // Proxy available at IP 192.168.0.6 on port 3128
req.Proxy.Credentials = new NetworkCredential("user", "pwd", "domain"); // Proxy network credentials
WebResponse res = req.GetResponse();

I always receive "The remote server returned an error: (407) Proxy Authentication Required.". What's wrong? Note that if I make the request over http the code works and with Internet Explorer I can open the file either over http or over https.

Thanks in advance for any help,
Andrea Pierini

PS: I've seen that many users experience the same problem with WSUS 3.0 behind a proxy with authentication

.



Relevant Pages

  • RE: Proxy requires authentication
    ... problem where it is being asked to authenticate to the proxy server. ... sure the problematic client also have Firewall Client installed. ... | Thread-Topic: Proxy requires authentication ...
    (microsoft.public.windows.server.sbs)
  • Re: httpwebrequest with https behind proxy with authentication
    ... contact Microsoft Customer Support ... httpwebrequest with https behind proxy with authentication ... Our proxy server uses NTLM authentication and as you suggested I ...
    (microsoft.public.dotnet.framework)
  • Re: httpwebrequest with https behind proxy with authentication
    ... Our proxy server uses NTLM authentication and as you suggested I modified the code as follows: ... I still receive "The remote server returned an error: Proxy Authentication Required." ... and it works if I use http instead of https or if I disable authentication on the proxy ... Microsoft MSDN Online Support Lead ...
    (microsoft.public.dotnet.framework)
  • Re: httpwebrequest with https behind proxy with authentication
    ... Our proxy server uses NTLM authentication and as you suggested I modified the code as follows: ... I still receive "The remote server returned an error: Proxy Authentication Required." ... and it works if I use http instead of https or if I disable authentication on the proxy ...
    (microsoft.public.dotnet.framework)
  • RE: IIS cross domain windows integrated authentication problem
    ... Depending on what version of proxy you have set up for the clients to point ... answer is to use certificates for all sites that require authentication (at ... > client with a migration in progress. ... > intranet webservers are in domain B. The intranet sites use Windows ...
    (microsoft.public.inetserver.iis)