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

Obtaining username of logged on user 1

Status
Not open for further replies.

rubikWizard

Programmer
Jul 10, 2005
5
GB
Hello

I have written an ASP application that runs on a Windows network. The data is not sensitive and I want users to be able to enter the application without having to log on to the application (to save time)

I thought that I would be able to get the name of the current user from request.servervariables("Logon_User") and then compare this to a database to get the users details. However request.servervariables("Logon_User")aways seems to return an empty string.

What am I doing wrong, or am I going about this the wrong way? Do I need to configure IIS in some way?

Any suggestions would be greatfully received.

Thanks
 
you need to remove anonymous to the directory your web site is held in

in iis right click on the directory select properties > director security and edit

then untic the anonymous access

i think that will do it :)

}...the bane of my life!
 
Thanks for that guitardave. I will try it.

What happens if some accesses the page from outside the network (i.e. from the web)? I would like users not in my database to be directed to a different page. Do web accesses return an empty string or the username from their computer/network? Can outside users be forced to login?

Thanks for your help.

rubikWizard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top