Getting Logged in User Name

  • Thread starter Thread starter Ganesh Ramamurthy
  • Start date Start date
G

Ganesh Ramamurthy

Hi Experts,

I am using windows integrated authentication in my ASP.Net application. I
get a Windows Login dialog box and the user has to enter a username and
password to access the pages. Once the user has logged in successfuly, I
need to get the signed in userID and password (If possible.)

Can I use
System.Net.CredentialCache.DefaultCredentials.GetCredential().UserName; for
this purpose. If so How is it possible to use that.

Please advice if there is a better way of doing the same.

Thankx in Advance

Regards
Ganesh
 
Ganesh Ramamurthy,
Since you are using Windows Auth u can get the logged on user
by <%=User.Identity.Name%>.
But you can't retrieve the Password!!
Are u validating against Active Directory?
Enjoy!
Pstrick
 
Back
Top