Request.ServerVariables Application

Source: Internet
Author: User
Tags servervariables variable server port

This machine ip:<%=request.servervariables
("REMOTE_ADDR")%>
Server name: <%=request.servervariables
("SERVER_NAME")%>
Server Ip:<%=request.servervariables
("Local_addr")%>
Server port: <%=request.servervariables
("Server_port")%>
Server Time:<%=now%>
IIS version: <%=request.servervariables
("Server_software")%>
Script Timeout Time:<%=server.scripttimeout%>
This file path: <%=server.mappath
(Request.ServerVariables ("Script_name"))%>
Number of server CPUs: <%=request.servervariables
("Number_of_processors")%>
Server Interpreter Engine: <%=scriptengine & "/" & scriptenginemajorversion& "." &ScriptEngineMinorVersion& ".
"& ScriptEngineBuildVersion%>
Server operating system: <%=request.servervariables ("OS")%>
Supported File types: <%=request.servervariables ("http_accept")%>
File path to access: <%=request.servervariables ("Http_url")%>
User agent information: <%=request.servervariables ("Http_user_agent")%>
Gets the filename and the value passed in the URL: request. ServerVariables ("Script_name") + "?" +request. ServerVariables ("Query_string")

Where ServerVariables is the server environment variable, the variable contains more content, we also use for loop to traverse the view.
<%for each i in request.servervariables%>
<%=i%>:
<%=request.servervariables (i)%>
<%Next%>

how Request.ServerVariables ("Http_referer") works

The following conditions are normally obtained request.servervariables ("Http_referer") from the address bar of the browser:
1. Direct use of <a href>
2. Forms submitted with Submit or <input type=image> (POST or get)
3. Forms submitted using JScript (POST or get)

Let's take a look at the case where Request.ServerVariables ("Http_referer") is not properly evaluated:
1. Links from Favorites
2. Click ' Home ' or a custom address
3. Use JScript's Location.href or Location.replace ()
4. Enter the address directly in the browser
5.<%response.redirect%>
6.<%response.addheader%> or <meta http-equiv=refresh> steering
7. Load addresses with XML

Obviously, Request.ServerVariables ("Http_referer") is not working properly in most cases.



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.