If they have to be logged on to the same network as the web server in
order to access it, you may want to check out the REMOTE_USER server
variable.
Here's an asp script I use to check app and server variables, cookies, etc.
<%
'
' List Server, Application and Session Variables
'
On Error Resume Next
dim strName
dim strSubKey
Dim item, itemloop
response.write "SERVER Variables Count = " & Request.ServerVariables.Count & "<br/><br/>"
For Each strName In Request.ServerVariables
If strname ="ALL_HTTP" OR strname ="ALL_RAW" then
response.write "Server Variable "
& strName &" = <br/>" &
Request.ServerVariables(strName) & "<br/><br/>"
Else
response.write "Server Variable "
& strName &" = " & Request.ServerVariables(strName)
& "<br/>"
End If
Next
response.write "<br/><br/>"
%>
SESSION Variables Count = <% =Session.Contents.Count %> Found<br/><br/>
<%
For Each item in Session.Contents
If IsArray(Session(item)) then
For itemloop = LBound(Session(item)) to UBound(Session(item))
%>
<%=item%> <%=itemloop%> <% =Session(item)(itemloop) %><br/>
<%
Next
Else
%>
<% =item %> <% =Session.Contents(item) %><br/>
<%
End If
Next
%>
<hr>
APPLICATION Variables Count = <% =Application.Contents.Count %> Found<br/><br/>
<%
For Each item in Application.Contents
If IsArray(Application(item)) then
For itemloop = LBound(Application(item)) to UBound(Application(item))
%>
<% =item %> <% =itemloop %> <% =Application(item)(itemloop) %><br/>
<%
Next
Else
%>
<% =item %> <% =Application.Contents(item) %><br/>
<%
End If
Next
response.write "<br/><br/><hr />"
response.write "MISCELLANEOUS Server Info<br/><br/>"
Response.Write "WebRoot Server Mappath = " & Server.MapPath("\") & "<br/>"
dim objAdoVer
Set objAdoVer = Server.CreateObject("adodb.connection")
response.write "ADOVersion = " & objAdoVer.Version
Set objAdoVer = Nothing
%> |