News:

Choose a design and let our professionals help you build a successful website   - ITAcumens

Main Menu

determine the Windows User from a Web form Application

Started by nandagopal, Nov 17, 2008, 02:44 PM

Previous topic - Next topic

nandagopal

Use the System.Security.Principal namespace.

VB.NET

dim wp as WindowsPrincipal = new WindowsPrincipal(WindowsIdentity.GetCurrent())
Response.Write(wp.Identity.Name)


C#

WindowsPrincipal wp = new WindowsPrincipal(WindowsIdentity.GetCurrent());
Response.Write(wp.Identity.Name);