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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What happened to ServerVariables(LOGON_USER)

Status
Not open for further replies.

santiago

Programmer
Aug 14, 2000
5
US
Does anybody know how to get ServerVariables(LOGON_USER) in ASP.NET?

I have an intranet application in classic ASP wherein I get the ntlogin of the user using ServerVariables(LOGON_USER) and then check their access rights to the application. This way, the user does not need to enter separate login (just use their network id).

In ASP.NET, when I try to get the ServerVariables(LOGON_USER), I am getting nothing. I have set the Anonymous access off and use integrated windows security in IIS for the application (same as the classic ASP application I am rewriting.

Any ideas?

Thanks in advance.

 
Hi Santiago,

You can use Windows authentication in ASP.NET. It is configured in the Web.config file. In the Web.config file specify the &quot;Windows&quot; authentication mode and then turn on impersonation within the <identity> element.

Sample:

<configuration>
...
<system.web>
<authentication mode=&quot;Windows&quot; />
<identity impersonate=&quot;true&quot; />
</system.web>
...
</configuration>

This will set up an application or section of an application to use Windows authentication. There are more features available for additional control. Hopefully this will lead you in the right direction.

Kyle
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top