Proxy auth with default credentials
- From: "kristan.mcdonald@xxxxxxxxxxxxxx" <kristan.mcdonald@xxxxxxxxxxxxxx>
- Date: 23 Feb 2006 06:29:43 -0800
Ok, I've managed to get authenticated on my proxy by doing :
System.Net.WebRequest req;
req = System.Net.WebRequest.Create("http://www.mywebsite.com/");
System.Net.WebProxy prx = new
System.Net.WebProxy("http://myproxyserver",true);
System.Net.CredentialCache cache = new System.Net.CredentialCache();
cache.Add( new Uri( "http://myproxyserver" ), "NTLM", new
System.Net.NetworkCredential("username", "password", "domain") );
I want this to be an app on the intranet and use the impersonated users
details. I've setup IIS to auth using integrated authentication, the
..net app is set to impersonate=true and windows authentication. The box
is set to be trusted for delegation etc.
But I can't figure out how in code to create the cache entry for the
proxy server for the impersonated user. I don't want to hardcode a
un/pw for obvious reasons but I can't see any other way. I've tried to
use the System.Net.CredentialCache.DefaultCredential but I just get a
proxy auth required message if I try it.
BTW, for some reason setting the proxies credential to the
DefaultCredential doesn't seem to work, if I look at a packet trace it
tries to negotiate authentication with the proxy server but it does it
under "Negotiate" rather than "NTLM" - this seems to make a difference.
Help!
.
- Follow-Ups:
- Re: Proxy auth with default credentials
- From: Joe Kaplan \(MVP - ADSI\)
- Re: Proxy auth with default credentials
- Prev by Date: Re: Application Pool without Anonymous Access
- Next by Date: Re: Application Pools, Domain User Accounts and Service Principal Names
- Previous by thread: Application Pool without Anonymous Access
- Next by thread: Re: Proxy auth with default credentials
- Index(es):
Relevant Pages
|
|