CredentialCache.DefaultCredentials not working!!!!!

Ask a Question related to ASP.NET Security, Design and Development.

  1. #1

    Default CredentialCache.DefaultCredentials not working!!!!!

    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


    Paul Cheevers Guest

  2. Similar Questions and Discussions

    1. Credentials persist after CredentialCache.Remove()
      So I've been banging my head against the wall here for a while now and cannot find any useful information regarding this issue that I'm having. ...
    2. CredentialCache.DefaultCredentials Not working
      I am using the following method to call a web service from a windows application Dim a As New MachineReference.Service1 a.Credentials = s...
    3. Get DefaultCredentials of one web app into another?
      We have a web app which links to another ASP.NET web application (namely the Microsoft CRM). Our app is launched in a new browser window from a link...
    4. net.credentialcache.defaultcredentials is blank and will not retain user info
      Hi, As the subject suggests, the defaultcredentials object that i need my code to acces is empty, despite the user having logged onto a win 2000...
    5. authentication using CredentialCache against proxy server problem
      Hi all I'm not able to authenticate against proxy server when I try to pass an instance of CredentialCache to WebProxy instance used with...
  3. #2

    Default Re: CredentialCache.DefaultCredentials not working!!!!!

    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

    "Paul Cheevers" <paul@nospamaimware.com> wrote in message
    news:uNs7z1NlEHA.1356@TK2MSFTNGP09.phx.gbl...
    > 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
    >
    >

    One Handed Man \( OHM - Terry Burns \) Guest

  4. #3

    Default Re: CredentialCache.DefaultCredentials not working!!!!!

    Thanks for the reply......

    I'm talking about code in a webpart on WSS

    ????


    "One Handed Man ( OHM - Terry Burns )" <news.microsoft.com> wrote in message
    news:e76dQfOlEHA.712@TK2MSFTNGP09.phx.gbl...
    > 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
    >
    > "Paul Cheevers" <paul@nospamaimware.com> wrote in message
    > news:uNs7z1NlEHA.1356@TK2MSFTNGP09.phx.gbl...
    > > 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
    > >
    > >
    >
    >

    Paul Cheevers Guest

  5. #4

    Default Re: CredentialCache.DefaultCredentials not working!!!!!

    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:
    [url]http://msdn.microsoft.com/vstudio/using/building/web/default.aspx?pull=/library/en-us/dnnetsec/html/SecNetHT05.asp?FRAME=true#ImplementKerberos[/url]

    Joe K.

    "Paul Cheevers" <paul@nospamaimware.com> wrote in message
    news:uNs7z1NlEHA.1356@TK2MSFTNGP09.phx.gbl...
    > 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
    >
    >

    Joe Kaplan \(MVP - ADSI\) Guest

  6. #5

    Default Re: CredentialCache.DefaultCredentials not working!!!!!

    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

    "Paul Cheevers" <paul@nospamaimware.com> wrote in message
    news:Ozw5bMPlEHA.3720@TK2MSFTNGP12.phx.gbl...
    > Thanks for the reply......
    >
    > I'm talking about code in a webpart on WSS
    >
    > ????
    >
    >
    > "One Handed Man ( OHM - Terry Burns )" <news.microsoft.com> wrote in
    message
    > news:e76dQfOlEHA.712@TK2MSFTNGP09.phx.gbl...
    > > 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
    > >
    > > "Paul Cheevers" <paul@nospamaimware.com> wrote in message
    > > news:uNs7z1NlEHA.1356@TK2MSFTNGP09.phx.gbl...
    > > > 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
    > > >
    > > >
    > >
    > >
    >
    >

    One Handed Man \( OHM - Terry Burns \) Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139