Live Chat Icon For mobile
Live Chat Icon

How to determine the Windows User from a Web form Application

Platform: ASP.NET| Category: Security

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);

Share with

Share on twitter
Share on facebook
Share on linkedin

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.