Getting Logged in User Name

  • Thread starter Ganesh Ramamurthy
  • 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
 
P

Patrick Olurotimi Ige

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
 

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

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top