User Login- Windows Identity - TechRepublic
General discussion
July 27, 2006 at 01:50 AM
bsmgopal1984

User Login- Windows Identity

by bsmgopal1984 . Updated 19 years, 11 months ago

Dear all,
If we have 1000 employees in office,every one having their own user id or employee number.
How can I display their Employee number in ASP page?
When the people open a particular web page which is created by ASP.Net,at the time their page should show their employee number.
This employee number should be displayed based on the user login.
I have used the below code:
WindowsIdentity id=WindowsIdentity.GetCurrent();
Response.Write(id.Name);
But it doesn’t working! It shows:NT AUTHORITY\NETWORK SERVICE
How can I get user’s employee number in web page?
Please let me know.Thanks in advance

This discussion is locked

All Comments