Home All Groups Group Topic Archive Search About

HTTPS and authentication credentials

Author
30 Jun 2006 2:37 AM
alanw via DotNetMonster.com
My Windows forms client application (written in C#.NET) needs to be able to
connect to a web service regardless of the configuration of the proxy server
it goes through. I am using the following code to achieve this:

      IWebProxy iwp20 = WebRequest.DefaultWebProxy;
      iwp20.Credentials = CredentialCache.DefaultCredentials;
      webService.Proxy = iwp20;

This code works in all but one case: when NTLM authentication is required
_and_ the web service must be accessed via HTTPS. Using Ethereal I can see
that the full domain and user names are passed to the proxy server when using
HTTP, but when using HTTPS, only the first character of domain and user names
are passed (and hence authentication fails).

Has anyone else experienced this problem?

Thanks

Alan

--
Message posted via http://www.dotnetmonster.com

Author
9 Sep 2006 2:38 AM
whoareyou
Yes - have the same issue.  Credentials will pass through the proxy via http
but not when using https.  

Any more info from anyone available on this?

Show quoteHide quote
"alanw via DotNetMonster.com" wrote:

> My Windows forms client application (written in C#.NET) needs to be able to
> connect to a web service regardless of the configuration of the proxy server
> it goes through. I am using the following code to achieve this:
>
>       IWebProxy iwp20 = WebRequest.DefaultWebProxy;
>       iwp20.Credentials = CredentialCache.DefaultCredentials;
>       webService.Proxy = iwp20;
>
> This code works in all but one case: when NTLM authentication is required
> _and_ the web service must be accessed via HTTPS. Using Ethereal I can see
> that the full domain and user names are passed to the proxy server when using
> HTTP, but when using HTTPS, only the first character of domain and user names
> are passed (and hence authentication fails).
>
> Has anyone else experienced this problem?
>
> Thanks
>
> Alan
>
> --
> Message posted via http://www.dotnetmonster.com
>