问题描述
亲爱的所有人,
我使用以下代码获取内网应用程序的NT ID
string CurrentUser1;
CurrentUser1 = System.Security.Principal.WindowsIdentity.GetCurrent( ).Name.ToString();
string [] Cuser1 = CurrentUser1.Split('\\');
回复.Write(@< script language ='javascript'> alert('ICICI USERNAME:\ n+ Cuser1 [1] .ToString()+。ICICI:\ n+ CurrentUser1 +。') ;< /脚本>中);
它在本地开发系统中工作正常,但是当我在现场部署它时会出现问题,它正在获取服务器的ID及其难以理解的错误。
任何人都可以让我如何获得客户端系统NT ID。
Plz让我知道如何解决这个。
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.
推荐答案
这篇关于如何使用c#获取Windows客户端用户的NT ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!