如何使用Flex/Actionscript獲取Window NT記錄的用戶名。我曾與ASP.NET實現這些憑證的工作,但我是新來的Flex的境界,需要一些幫助你如何能夠使用Flex/Actionscript獲取Window NT記錄的用戶名?
ASP.NET代碼如下
Getting the User Name :
using three ways we can get the User Name using C#
1) System.Security.Principal.WindowsPrincipal p =
System.Threading.Thread.CurrentPrincipal as System.Security.Principal.WindowsPrincipal;
string strName = p.Identity.Name;
[ OR ]
2) string strName = HttpContext.Current.User.Identity.Name.ToString();
[ OR ]
3) string strName = Request.ServerVariables["AUTH_USER"]; //Finding with name
string strName = Request.ServerVariables[5]; //Finding with index
我相信這個問題應該是封閉的,因爲它是一個複製http://stackoverflow.com/questions/1376/get-the-current-logged-in-os-user-in-adobe-air – shaunhusain 2012-03-13 17:34:57
感謝您的洞察力。這篇文章非常有幫助。當我搜索時,我根本沒有看到這個話題。欣賞它很多! – nholloway4 2012-03-14 21:09:39