CredentialCache.DefaultCredentials not working!!!!!

P

Paul Cheevers

Hi,

I'm trying to use the CredentialCache.DefaultCredentials to pick up the
credentials of the current user but its not working correctly. I've switched
off anonymous access and gone thru the code in debug mode but I keep getting
a 401 security exception. The code works perfect if I hard code a user name
and password.

After a lot of messing around I got it to work on the server (if I navigate
to the webpart that contains the code from a browser on the actual server)
when I set my browser to automatically logon on. However the code still
breaks on client machines even if I make this change.

This is driving me nuts, any help or suggestions would be appreciated.

Cheers,
Paul
 
O

One Handed Man \( OHM - Terry Burns \)

You should be communicating this in the appropriate beta group rather than
this one which is for released software

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .
If U Need My Email ,Ask Me

Time flies when you don't know what you're doing
 
P

Paul Cheevers

Thanks for the reply......

I'm talking about code in a webpart on WSS

????
 
J

Joe Kaplan \(MVP - ADSI\)

A few questions:
Are you using Windows Integrated Auth. on the server?
Are you impersonating the logged on user (I think WSS does this by default,
but I'm not sure)?
Is this code running on the server?

If the above are true, then you have an impersonation token on the server
and those credentials will not hop to a different machine unless you have
Kerberos delegation enabled and working. That sounds like what is happening
here.

Check out this link and also try searching for double-hop. That should get
you started:
http://msdn.microsoft.com/vstudio/u...l/SecNetHT05.asp?FRAME=true#ImplementKerberos

Joe K.
 
O

One Handed Man \( OHM - Terry Burns \)

Sorry my mistake, it seems to be a day of mistakes for me, I think I need a
coffee

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .
If U Need My Email ,Ask Me

Time flies when you don't know what you're doing
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,571
Members
45,045
Latest member
DRCM

Latest Threads

Top