View Full Version : Request.ServerVariables Error

08-11-2005, 02:40 AM
I would like to collect the host information (e.g. Logon_user,...) and pass it back to the server.

But when I retreve the variable, it return BLANK.


08-11-2005, 04:33 PM
<%@ Language=VBScript %>
<%Option Explicit%>
<title>Server Variables</title>
<table cellpadding="1" cellspacing="0" border="1">
Dim Item
For Each Item In Request.ServerVariables
Response.Write "<tr>" & vbcrlf
Response.Write "<td>" & Item & "</td>" & vbcrlf
Response.Write "<td>" & Request.ServerVariables(Item) & "</td>" & vbcrlf
Response.Write "</tr>" & vbcrlf
Run this on the server you are coding on and you'll get all of the server variables back plus which ones to use. If you are trying to obtain a user's id, you will need to turn annonymous access off, otherwise it will return blank.