User Name

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have been using ASP.NET to retrieve the logon name with the
User.Identity.Name property. I also have some old ASP pages as well. Is
there an way to retrieve this information in ASP (not ASP.Net) as well?

Thanks in advance for your assistance.
 
I have been using ASP.NET to retrieve the logon name with the
User.Identity.Name property. I also have some old ASP pages as well. Is
there an way to retrieve this information in ASP (not ASP.Net) as well?

Thanks in advance for your assistance.

What type of Authentication do you use? I suppose you want to get a
Windows logon name?

To use Windows Authentication, enable "Integrated Windows
Authentication" within IIS. Add to a web.config file an
<authentication> section and set the mode to "Windows".

<configuration>
<system.web>
<authentication mode="Windows" />
<authorization>
<deny users="?"/>
</authorization>
</system.web>
</configuration>

Once it's done, you can access the logged-in username.

In ASP 3.0 it can be done using Request.ServerVariables("LOGON_USER")
 
Back
Top