Retrieving Windows Login
-
Hi all I've created a ASP.NET/VB.NET intranet application to maintain a database via a datagrid and was looking to retrieve the Windows username of the current user of the application so that when they click to update any changes they make, a field in the database will update showing that user as the last person to update that record. I've set the authentication to 'windows' in the webconfig file, could anyone point me to the code I would need to retrieve the windows username? Many Thanks
Rob
-
Hi all I've created a ASP.NET/VB.NET intranet application to maintain a database via a datagrid and was looking to retrieve the Windows username of the current user of the application so that when they click to update any changes they make, a field in the database will update showing that user as the last person to update that record. I've set the authentication to 'windows' in the webconfig file, could anyone point me to the code I would need to retrieve the windows username? Many Thanks
Rob
-
Hi all I've created a ASP.NET/VB.NET intranet application to maintain a database via a datagrid and was looking to retrieve the Windows username of the current user of the application so that when they click to update any changes they make, a field in the database will update showing that user as the last person to update that record. I've set the authentication to 'windows' in the webconfig file, could anyone point me to the code I would need to retrieve the windows username? Many Thanks
Rob
Hi Rob, Using this 'Environment.UserName' also you will get windows username.
Kiran Kumar.CH (MCP)
-
Hi all I've created a ASP.NET/VB.NET intranet application to maintain a database via a datagrid and was looking to retrieve the Windows username of the current user of the application so that when they click to update any changes they make, a field in the database will update showing that user as the last person to update that record. I've set the authentication to 'windows' in the webconfig file, could anyone point me to the code I would need to retrieve the windows username? Many Thanks
Rob
dim wp as WindowsPrincipal = new WindowsPrincipal(WindowsIdentity.GetCurrent()) Response.Write(wp.Identity.Name)
Source: http://www.syncfusion.com/FAQ/aspnet/WEB_c17c.aspx[^]Vasudevan Deepak Kumar Personal Homepage Tech Gossips