Click to See Complete Forum and Search --> : windows login id


VChellam1972
August 23rd, 2004, 01:15 PM
I have asp.net application. I want to get get the login id by which user has logged in to the window operation system. My windows login id is VChell but in my IIS the domain starts with Venkat-Chellam(which is my computer name). so when i use Windows Identity object and use get current, it returns me Venkat_Chellam/Aspnet but what i want is VChell(Windows 2000 login id). Does anyone know how to get that windows login id?

venkat

MRutledge
August 24th, 2004, 11:39 AM
In order to do this you have to turn Anonynous authentication off in IIS and turn Windows integrated security on. Then in your web.config file you will need to add

<identity impersonate="true" />

then when you need to get the user name you can just use

HttpContext.Current.User.Identity.Name;

Dozo_1st
August 27th, 2004, 08:08 AM
Doesn't work with me....

MRutledge
August 27th, 2004, 09:46 AM
You have to m ake sure you have turned off anonymous windows access in IIS and turned on itegrated windows access.

Dozo_1st
September 2nd, 2004, 08:22 AM
You have to m ake sure you have turned off anonymous windows access in IIS and turned on itegrated windows access.

I have. I tried it with an alert to display the value of identity.name. It was empty????

clarayeung
August 18th, 2005, 03:10 AM
how about the coding if I use .NET? I would like to know how to get the login name and password of Windows Logon

Thanks in advance