aspinfo()
Posted: 2002-06-01
By: ArchiveBot
Viewed: 125
Filed Under:
No attachments for this post
aspinfo() is the equivalent of phpinfo(). It displays all kinds of information about the server, asp, cookies, sessions and several other things in a neat table, properly formatted.
Original Author: Dennis Pallett
Assumptions
You can include my code in any of your pages and call aspinfo() to show the information of your server and asp. However, if you are going to that make sure you remove aspinfo() above Sub aspinfo().
Code
<%
aspinfo()
Sub aspinfo()
Dim strVariable, strASPVersion
Dim strCookie, strKey, strSession
'Retrieve the version of ASP
strASPVersion = ScriptEngine & " Version " & _
ScriptEngineMajorVersion & "." & _
ScriptEngineMinorVersion
%>
ASP (<%= strASPVersion %>)
Server Variables
<%
For Each strVariable In Request.ServerVariables
Response.write("") ")
Response.write("" & strVariable & " ")
Response.write("" & Request.ServerVariables(strVariable) & " ")
Response.write("
Next 'strVariable
%>Cookies
<%
For Each strCookie In Request.Cookies
If Not Request.Cookies(strCookie).HasKeys Then
Response.write("") ")
Response.write("" & strCookie & " ")
Response.write("" & Request.Cookies(strCookie) & " ")
Response.write("
Else
For Each strKey In Request.Cookies(strCookie)
Response.write("") ")
Response.write("" & strCookie & "(" & strKey & ") ")
Response.write("" & Request.Cookies(strCookie)(strKey) & " ")
Response.write("
Next
End If
Next
%>Session Cookies
<%
For Each strSession In Session.Contents
Response.write("") ")
Response.write("" & strSession & " ")
Response.write("" & Session(strSession) & " ")
Response.write("
Next
%>Other variables
Session.sessionid <%= Session.sessionid %> Server.MapPath <%= Server.MapPath ("/") %>
<%
End Sub
%>
Comments on this post
No comments have been added for this post.
You must be logged in to make a comment.