我遇到了以下问题,同时部署我的应用程序到Web服务器,
那我的代码是“Usercheck = My.User.Name”,但将返回服务帐户运行Web应用程序我的情况,所以我需要当我尝试以显示“evilla”这是我目前的Windows凭据,连接首次到Web应用程序,它要求我的网络凭据。
是否有可能抢我的Windows用户名,而不是服务帐户? (我远程conecting到应用)
我努力了:
'Usercheck = Request.LogonUserIdentity.Name
Usercheck = HttpContext.Current.Request.LogonUserIdentity.Name
TextBox4_AddDataControl.Text = Usercheck
TextBox6_AddDataControl.Text = Environment.UserName
我这么想?
注:我从上面的代码“NA / SRS-SA”获得(服务帐户)
谢谢!!