homepage Welcome to WebmasterWorld Guest from 54.145.209.42
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Microsoft / Microsoft IIS Web Server and ASP.NET
Forum Library, Charter, Moderators: ocean10000

Microsoft IIS Web Server and ASP.NET Forum

    
How to find out what you can know about a server
Using Request.ServerVariables in IIS code
Xoc

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 1478 posted 8:54 pm on Feb 18, 2004 (gmt 0)

In the last few days, there has been a number of questions that have been answered with information retrieved from Request.ServerVariables. This code, first posted here, [webmasterworld.com ], shows how to do that. Similar code will work from .NET.

Place this code into an ASP page, then browse to the page. I suggest taking the page offline or restricting access to it, since some of the variables might help a hacker.


<table border="1">
<th colspan="2">ServerVariables</th>
<%
Dim var
For Each var in Request.ServerVariables
Call Response.Write("<tr>")
Call Response.Write("<td><b>" & var & "</b>:</td>")
Call Response.Write("<td>" & Request.ServerVariables(var) _
& "</td>")
Call Response.Write("</tr>")
Next
%>
</table>

This code has been added to the Library [webmasterworld.com] if you are looking for it in the future.

[edited by: Xoc at 9:27 pm (utc) on Feb. 18, 2004]

 

txbakers

WebmasterWorld Senior Member txbakers us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 1478 posted 8:59 pm on Feb 18, 2004 (gmt 0)

That's very useful - thanks for posting it!

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Microsoft / Microsoft IIS Web Server and ASP.NET
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved