DefaultCredentials blank

M

mbrand

I've looked through everything I can find about this subject but
nothing has resolved my problem. All I'm trying to do is access a
webservice from a client app with the credentials of the person using
the client app.

When I set the service credentials to
"System.Net.CredentialCache.DefaultCredentials" the username, pw and
domain are all blank (I've checked in the debugger). So because of
this I'm getting a 401 unauthorized user error when I try to call any
methods in my service.

In my web.config, I have <identity impersonate="true"> and
<authentication mode="Windows"/>

In IIS I have anonymous access turned off and I have integrated windows
authentication turned on.

Is there anything else that I'm missing? I've also tried setting
PreAuthenticate = true but that didn't work.
 
M

mbrand

Some extra information I've learned

Ok, so in my code before I connect to my webservice I have
service.Credentials = System.Net.CredentialCache.DefaultCredentials;

When I check in the debugger, all of the entries are blank (username,
password, domain) which is kind of odd. However, I have checked on the
server and it shows that my DOMAIN\username is trying to log in but
failed because of a 529 error (Unknown user name or bad password).
Since I can see that the DOMAIN\username are correct that means it has
to be a problem with the password. I'm guessing that it might be
sending a blank password but I really have no idea. Is there something
I'm missing?
 

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,989
Messages
2,570,207
Members
46,783
Latest member
RickeyDort

Latest Threads

Top