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

Getting username and IP address

Status
Not open for further replies.

jdgonzalez

Programmer
May 11, 2004
72
US
Hi all,

I've tried to use the search on the site, but it appears to not be functioning correctly as it won't limit my search to use the asp forum. Here's my issue: I'm trying to capture the IP address and username on a page, but I'm struggling on how to get that information. The information that I have says that you should you '<!--#echo VAR="auth_user"-->', but I can't seem to get it to work.

I have this on my code, but it doesn't seem to execute it.

Any ideas?
 
<!-- --> comments out whatever text is between the brackets. So what you have there is not executing. Try removing them.
 
That's what I had thought, but my includes are working correctly. <!--#include file="Connections/dbConn.asp" --> Is #include the only SSI that is allowed by asp? ...or do I have to enable something within IIS?

 
Ok... I think I found a solution. I was able to get the IP address using <% response.write(request.ServerVariables("remote_addr")) %>. When I try to get 'auth_user', it does not return a value. Am I missing something here?
 
or servervariables("LOGON_USER")

However both will only return a value is Anonymous Access is off

Chris.

Indifference will be the downfall of mankind, but who cares?
A website that proves the cobblers kids adage.
Nightclub counting systems

So long, and thanks for all the fish.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top