Response.Write ("Server machine Name:" + server.machinename); Response.Write ("<br/>"); Response.Write ("Server IP Address:" + request.servervariables["local_addr"]); Response.Write ("<br/>"); Response.Write ("Server domain name:" + request.servervariables["SERVER_NAME"]); Response.Write ("<br/>"); Response.Write (". NET Interpretation engine version: "+". NET CLR "+ System.Environment.Version); Response.Write ("<br/>"); Response.Write ("Server OS version:" + System.Environment.OSVersion.ToString ()); Response.Write ("<br/>"); Response.Write ("Server IIS version:" + request.servervariables["Server_software"]); Response.Write ("<br/>"); Response.Write ("HTTP Access port:" + request.servervariables["Server_port"]); Response.Write ("<br/>"); Response.Write ("Absolute path to Virtual directory:" + request.servervariables["Appl_rhysical_path"]); Response.Write ("<br/>"); Response.Write ("Absolute path to execute file:" + request.servervariables["path_translated"]); Response.Write ("<br/>"); Response.Write ("Total Session:" + Session.Contents.Count.ToString ()); Response.Write ("<br/>"); Response.Write ("AppLication total: "+ Application.Contents.Count.ToString ()); Response.Write ("<br/>"); Response.Write ("Number of cache caches:" + Cache.Count.ToString ()); Response.Write ("<br/>"); Response.Write ("Server Host:" + request.servervariables["http_host"]); Response.Write ("<br/>"); Response.Write ("Server area language:" + request.servervariables["http_accept_language"]); Response.Write ("<br/>"); Response.Write ("Visitor Information:" + request.servervariables["http_user_agent"]); Response.Write ("<br/>"); Response.Write ("Number of server CPUs:" + System.Environment.GetEnvironmentVariable ("number_of_processors")); Response.Write ("<br/>"); Response.Write ("Server CPU Type:" + System.Environment.GetEnvironmentVariable ("Processor_identifier"));
You may ask Http_host and server_name that the values are the same, what is the difference between them?
The usual server default port for 80,http_host will omit the port number that is not displayed. If the server is a non-80 port, Http_host displays the port number.
Simply put: Http_host = Server_name:server_port