Click here to Skip to main content
15,896,502 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear All,

I am using the following code to get the NT ID for my intranet application




string CurrentUser1;
CurrentUser1 = System.Security.Principal.WindowsIdentity.GetCurrent().Name.ToString();
string[] Cuser1 = CurrentUser1.Split('\\');

Response.Write(@"<script language='javascript'>alert('ICICI USERNAME: \n" + Cuser1[1].ToString() + " .ICICI: \n" + CurrentUser1 + " .');</script>");

It is working fine in the local development system, But problem arises when I deployed on live it is taking the ID of the server and its toughing error.

Can any one let me how to get the client system NT ID .

Plz let me know how to solve this.
Posted

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900