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

Do Server Variables have to be toggled on?

Status
Not open for further replies.

powahusr

Technical User
Joined
Jan 22, 2001
Messages
240
Location
US
OS: Windows 2000 Pro
IIS: 5.0


I would like to collect the "REMOTE_ADDR" ServerVariable through my ASP form when a user visits my site. Do I have to enable this in IIS, because I cannot seem to parse the value when the form executes? I am pretty sure the ASP code is fine.

If I do have to enable this, where do I do it? I have dug rather deeply into IIS to find out where I could make an adjustment, but I just could not find anything relevant.


I included the following snippet at the top of the ASP page:

<% ip = Request.ServerVariables(&quot;REMOTE_ADDR&quot;) %>


Thanks in advance
 
The REMOTE_ADDR is passed as header information. You do not need to do anything to get it but use the code that you have. Of course the person accessing your page must be comming from a server. So testing this means that you should make a link to the page with the script on it that has a link to your page. Then you will get the info you are looking for.

<%dim ip
set ip = request.ServerVariable(&quot;REMOTE_ADDR&quot;)
Response.write(ip)%>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top