Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

The following line: <%=System.Thre

Status
Not open for further replies.

harmmeijer

Programmer
Mar 1, 2001
869
CN
The following line:
<%=System.Threading.Thread.CurrentThread.CurrentPrincipal.identity.name %>

Prints out my domain account both from my localhost (localhost/test.aspx) or when placed another server and viewed from my PC (otherpc/test.aspx). I thought that aspx pages run under the aspnet account, the following line is from my machine.config:
<section name=&quot;processModel&quot; type=&quot;System.Web.Configuration.ProcessModelConfigurationHandler, System.Web, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=sometoken&quot; allowDefinition=&quot;MachineOnly&quot; />

Q1.
Anyway there is no user and password in there especially not mine so why do I see my account when I request pricipal values from the current thread of an ASPX page?

Q2.
How do I read the current user? (aspnet)




Greetings, Harm Meijer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top