DefaultCredentials blank

Discussion in 'ASP .Net' started by mbrand, Nov 14, 2006.

  1. mbrand

    mbrand Guest

    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.
     
    mbrand, Nov 14, 2006
    #1
    1. Advertisements

  2. mbrand

    mbrand Guest

    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?
     
    mbrand, Nov 15, 2006
    #2
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.