Get user credentials

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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)
 
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?
 
Back
Top