This article is a mirror article of machine translation, please click here to jump to the original article.

View: 14293|Reply: 0

[ASP.NET] asp.net displays server information and configuration

[Copy link]
Posted on 12/29/2015 5:08:24 PM | | |
Request start time: 2015-12-29 14:15:00
Server name: AAA-DDD-001
Server IP address: ::1
HTTP access port: 62898
. .NET Interpretation Engine version: .NET CLR2.0.50727.8000
Server OS version: Microsoft Windows NT 6.2.9200.0
Server IIS version: Microsoft-IIS/8.0
Server domain name: localhost
Absolute path to virtual directory:
Absolute path to the executable file: C:\TEst\Default.aspx
Total number of virtual directory RedisSessions: 1
Total number of virtual directory applications: 0
Domain host: localhost:62898
Server region language: zh-CN, zh; q=0.8
User information: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.71 Safari/537.36
Number of CPUs: 4
CPU type: Intel64 Family 6 Model 61 Stepping 4, GenuineIntel
Request Source Address:

StringBuilder sb = new StringBuilder();
            sb. AppendLine(string. Format("Request Start Time:{0}<br/>",DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")));
            sb. AppendLine(string. format("servername:{0}<br/>", Server.MachineName));
            sb. AppendLine(string. Format("Server IP Address:{0}<br/>", Request.ServerVariables["LOCAL_ADDR"]));
            sb. AppendLine(string. Format("HTTP Access Port:{0}<br/>", Request.ServerVariables["SERVER_PORT"]));
            sb. AppendLine(string. Format(". .NET Interpretation Engine Version: .NET CLR{0}<br/>", Environment.Version.Major + "." + Environment.Version.Minor + "." + Environment.Version.Build + "." + Environment.Version.Revision));
            sb. AppendLine(string. Format("Server OS Version:{0}<br/>", Environment.OSVersion.ToString()));
            sb. AppendLine(string. Format("Server IIS Version:{0}<br/>", Request.ServerVariables["SERVER_SOFTWARE"]));
            sb. AppendLine(string. format("server_domain:{0}<br/>", Request.ServerVariables["SERVER_NAME"]));
            sb. AppendLine(string. Format("Absolute path to virtual directory: {0}<br/>", Request.ServerVariables["APPL_RHYSICAL_PATH"]));
            sb. AppendLine(string. Format("Absolute path to executable file: {0}<br/>", Request.ServerVariables["PATH_TRANSLATED"]));
            sb. AppendLine(string. Format("Virtual Directory RedisSession Total: {0}<br/>", RedisSession.Count));
            sb. AppendLine(string. Format("Virtual Directory Applications: {0}<br/>", Application.Contents.Count.ToString())));
            sb. AppendLine(string. format("host:{0}<br/>", Request.ServerVariables["HTTP_HOST"]));
            sb. AppendLine(string. Format("Server Region Language: {0}<br/>", Request.ServerVariables["HTTP_ACCEPT_LANGUAGE"]));
            sb. AppendLine(string. Format("User Info:{0}<br/>", Request.ServerVariables["HTTP_USER_AGENT"]));
            sb. AppendLine(string. Format("CPUs:{0}<br/>", Environment.GetEnvironmentVariable("NUMBER_OF_PROCESSORS")));
            sb. AppendLine(string. Format("CPU Type:{0}<br/>", Environment.GetEnvironmentVariable("PROCESSOR_IDENTIFIER")));
            sb. AppendLine(string. Format("Request Source Address:{0}<br/>", Request.Headers["X-Real-IP"]));

            lblInfo.InnerHtml = sb. ToString();






Previous:Microsoft.Web.Redis.Redis.RedisSessionStateProvider sets the Redis port and access password
Next:I ran into a very strange problem where the code in front of Thread.Sleep did not execute
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com