ASP.Net Security Context User Name

aspnet.pngASP.Net applications run in the security context of a user. The verify the identity of that user for a portion of your application:

  1. Create a new text file within the same folder as the pages you are interested in
  2. Add the following code:
    <%@ Page Language="VB" %> 
    <%Response.Write( _ 
    System.Security.Principal.WindowsIdentity.GetCurrent( _ 
  3. Change the file extension to “.aspx”.
  4. View the new page just as you would any other page on the web site.

3 Responses to ASP.Net Security Context User Name


    Submited post on – “ASP.Net Security Context User Name”

  2. Virtual PBX says:

    Most of the time I dont post on blogs, but I would like to say that this post really forced me to do so!

  3. Mabelle says:

    Thanks for sharing such a good idea, article is
    good, thats why i have read it fully

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: