0

How are you able to grab the Window NT Logged User Name using Flex/Actionscript. I have worked with attaining these credentials in ASP.NET, but I am new to the realm of Flex and need some assistance

ASP.NET code looks as follows

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
nholloway4
  • 246
  • 1
  • 4
  • 13
  • 1
    I believe this question should be closed as it's a duplicate http://stackoverflow.com/questions/1376/get-the-current-logged-in-os-user-in-adobe-air – shaunhusain Mar 13 '12 at 17:34
  • Thanks for the insight. The post was verry helpful. When I was searching I didnt see this topic the way I worded. Appreciate it alot! – nholloway4 Mar 14 '12 at 21:09

1 Answers1

0

Never seen any sort of access like that in Air and would not imagine you would ever be allowed (permissions) in Flex

you could possibly achieve the desired result using sockets? In AIr there is a SocketMonitor for this.

You can connect to specific port on machine and send and recieve data.

So you can create only a workaround: create a listener in C# and create a connection from this listener to your flex application.

MonkeyMagiic
  • 126
  • 1
  • 7
  • I will check this way out soon. This will cause us to create another layer on the Application Architecture so will let you know. Wouldn't be out the way though do accomplish this.... – nholloway4 Mar 14 '12 at 21:11