Get user credentials

Discussion in 'ASP .Net' started by =?Utf-8?B?V2lsbGlhbSBCdWNoYW5hbg==?=, Feb 20, 2007.

  1. Hi Folks

    I have made an asp.net page for our intranet which submits bugs into Team
    Foundation Server. So that the bugs appear to be raised by the person who is
    browsing the page I have created an instance of TeamFoundationServer by
    passing in the CredentialCache.DefaultCredentials:

    ICredentials c = CredentialCache.DefaultCredentials;
    _tfServer = new TeamFoundationServer(_serverName, c);

    Unfortunately, the CredentialCache.DefaultCredentials do not always tie up
    to the current user.
    Is there a way I can get the credentials of the current browser without
    having to prompt them to enter their username and password?

    Thanks
     
    =?Utf-8?B?V2lsbGlhbSBCdWNoYW5hbg==?=, Feb 20, 2007
    #1
    1. Advertising

  2. =?Utf-8?B?V2lsbGlhbSBCdWNoYW5hbg==?=

    bruce barker Guest

    in the web.config set identity impersonate and windows authenication on,
    and turn off anonymous access. also unless you use basic or kerberos,
    the webserver must be on the team foundation server as you will not have
    a forwarding login token.

    -- bruce (sqlwork.com)

    William Buchanan wrote:
    > Hi Folks
    >
    > I have made an asp.net page for our intranet which submits bugs into Team
    > Foundation Server. So that the bugs appear to be raised by the person who is
    > browsing the page I have created an instance of TeamFoundationServer by
    > passing in the CredentialCache.DefaultCredentials:
    >
    > ICredentials c = CredentialCache.DefaultCredentials;
    > _tfServer = new TeamFoundationServer(_serverName, c);
    >
    > Unfortunately, the CredentialCache.DefaultCredentials do not always tie up
    > to the current user.
    > Is there a way I can get the credentials of the current browser without
    > having to prompt them to enter their username and password?
    >
    > Thanks
     
    bruce barker, Feb 20, 2007
    #2
    1. Advertising

  3. Hi Bruce
    Many thanks for your reply. What you describe is the current configuration I
    am using. What I have found is that if I browse to the site on computer A as
    user A, then move onto computer B and browse the site as user B, the
    DefaultCredentials still believe I am user A for the first couple of calls!

    Is there any other way to get hold of the credentials?

    "bruce barker" wrote:

    > in the web.config set identity impersonate and windows authenication on,
    > and turn off anonymous access. also unless you use basic or kerberos,
    > the webserver must be on the team foundation server as you will not have
    > a forwarding login token.
    >
    > -- bruce (sqlwork.com)
    >
    > William Buchanan wrote:
    > > Hi Folks
    > >
    > > I have made an asp.net page for our intranet which submits bugs into Team
    > > Foundation Server. So that the bugs appear to be raised by the person who is
    > > browsing the page I have created an instance of TeamFoundationServer by
    > > passing in the CredentialCache.DefaultCredentials:
    > >
    > > ICredentials c = CredentialCache.DefaultCredentials;
    > > _tfServer = new TeamFoundationServer(_serverName, c);
    > >
    > > Unfortunately, the CredentialCache.DefaultCredentials do not always tie up
    > > to the current user.
    > > Is there a way I can get the credentials of the current browser without
    > > having to prompt them to enter their username and password?
    > >
    > > Thanks

    >
     
    =?Utf-8?B?V2lsbGlhbSBCdWNoYW5hbg==?=, Feb 20, 2007
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jamie
    Replies:
    4
    Views:
    14,109
    Jamie
    Mar 1, 2004
  2. Gavin Jacobs

    ASP.NET User Credentials

    Gavin Jacobs, Apr 18, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    871
    Chris Botha
    Apr 18, 2004
  3. Mudasir Ahmed

    save user credentials

    Mudasir Ahmed, Apr 21, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    353
  4. Jørn A.
    Replies:
    3
    Views:
    5,708
    Scott Allen
    Sep 10, 2004
  5. =?Utf-8?B?U2lvYmhhbg==?=

    Persisting user login credentials across pages

    =?Utf-8?B?U2lvYmhhbg==?=, Feb 20, 2005, in forum: ASP .Net
    Replies:
    19
    Views:
    839
    =?Utf-8?B?U2lvYmhhbg==?=
    Feb 28, 2005
Loading...

Share This Page