[英]How to identify whether setting is scoped user or application using code?
[英]How to identify the User running the application
我想檢查代碼中如何識別正在運行應用程序的用戶,我想確保應用了我在IIS中定義的域用戶
謝謝
我以前用過,請嘗試一下是否適合您
string userName = System.Security.Principal.WindowsIdentity.GetCurrent().Name;
您需要: HttpContext.Current.User或從控制器訪問HTTP上下文。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.