1
<%
@ Page Language
=
"
C#
"
%>
2 <% @ Import Namespace = " System.Globalization " %>
3 <% @ Import Namespace = " Microsoft.Win32 " %>
4 <% @ Import Namespace = " System.IO " %>
5 <% @ Import Namespace = " System.Diagnostics " %>
6 <! DOCTYPE html PUBLIC " -//W3C//DTD XHTML 1.0 Transitional//EN " " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd " >
7 < html xmlns = " http://www.w3.org/1999/xhtml " >
8 < head runat = " server " >
9 < title > asp.net 探针 </ title >
10 < style type = " text/css " >
11 body {font:12px tahoma;line-height:28px;background:black;color:white}
12 </ style >
13 </ head >
14 < body >
15 < form id = " form1 " runat = " server " >
16 < div >
17 <%
18 // 代码多有参考网络,特此申明,设计:阿会楠 sosuo8.com 可把代码直接复制到任何页面直接使用,代码为我所用,非我所想
19 Response.Write( " 计算机名: " );
20 Response.Write( " http:// " + HttpContext.Current.Request.Url.Host + HttpContext.Current.Request.ApplicationPath + " <br /> " );
21 Response.Write( " IP地址: " );
22 Response.Write(Request.ServerVariables[ " LOCAl_ADDR " ] + " <br /> " );
23 Response.Write( " 域名: " );
24 Response.Write(Request.ServerVariables[ " SERVER_NAME " ].ToString() + " <br /> " );
25 Response.Write( " 端口: " );
26 Response.Write(Request.ServerVariables[ " Server_Port " ].ToString() + " <br /> " );
27 Response.Write( " 本文件所在路径: " );
28 Response.Write(Request.PhysicalApplicationPath + " <br /> " );
29 Response.Write( " 操作系统: " );
30 Response.Write(Environment.OSVersion.ToString() + " <br /> " );
31 Response.Write( " 操作系统所在文件夹: " );
32 Response.Write(Environment.SystemDirectory.ToString() + " <br /> " );
33 Response.Write( " 脚本超时时间: " );
34 Response.Write((Server.ScriptTimeout / 1000 ).ToString() + " 秒 " + " <br /> " );
35 Response.Write( " 系统语言: " );
36 Response.Write(CultureInfo.InstalledUICulture.EnglishName + " <br /> " );
37 Response.Write( " .NET版本: " );
38 Response.Write( string .Concat( new object [] { Environment.Version.Major, ".", Environment.Version.Minor, Environment.Version.Build, ".", Environment.Version.Revision } ) + " <br /> " );
39 Response.Write( " IE版本: " );
40 RegistryKey key = Registry.LocalMachine.OpenSubKey( @" SOFTWARE/Microsoft/Internet Explorer/Version Vector " );
41 Response.Write(key.GetValue( " IE " , " 未检测到 " ).ToString() + " <br /> " );
42 Response.Write( " 启动到现在已运行: " );
43 Response.Write(((Environment.TickCount / 0x3e8 ) / 60 ).ToString() + " 分钟 " + " <br /> " );
44 Response.Write( " 逻辑驱动器: " );
45 string [] achDrives = Directory.GetLogicalDrives();
46 for ( int i = 0 ; i < Directory.GetLogicalDrives().Length - 1 ; i ++ )
47 {
48 Response.Write(achDrives[i].ToString());
49 }
50 Response.Write( " <br /> " );
51 Response.Write( " CPU 数量: " );
52 Response.Write(Environment.GetEnvironmentVariable( " NUMBER_OF_PROCESSORS " ).ToString() + " <br /> " );
53 Response.Write( " CPU类型: " );
54 Response.Write(Environment.GetEnvironmentVariable( " PROCESSOR_IDENTIFIER " ).ToString() + " <br /> " );
55 Response.Write( " ASP.NET所站内存: " );
56 Response.Write(((Double)Process.GetCurrentProcess().WorkingSet64 / 1048576 ).ToString( " N2 " ) + " M " + " <br /> " );
57 Response.Write( " ASP.NET所占CPU: " );
58 Response.Write(((TimeSpan)Process.GetCurrentProcess().TotalProcessorTime).TotalSeconds.ToString( " N0 " ) + " %<br /> " );
59 Response.Write( " 当前系统用户名: " );
60 Response.Write(Environment.UserName + " <br /> " );
61 %>
62 </ div >
63 </ form >
64 </ body >
65 </ html >
2 <% @ Import Namespace = " System.Globalization " %>
3 <% @ Import Namespace = " Microsoft.Win32 " %>
4 <% @ Import Namespace = " System.IO " %>
5 <% @ Import Namespace = " System.Diagnostics " %>
6 <! DOCTYPE html PUBLIC " -//W3C//DTD XHTML 1.0 Transitional//EN " " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd " >
7 < html xmlns = " http://www.w3.org/1999/xhtml " >
8 < head runat = " server " >
9 < title > asp.net 探针 </ title >
10 < style type = " text/css " >
11 body {font:12px tahoma;line-height:28px;background:black;color:white}
12 </ style >
13 </ head >
14 < body >
15 < form id = " form1 " runat = " server " >
16 < div >
17 <%
18 // 代码多有参考网络,特此申明,设计:阿会楠 sosuo8.com 可把代码直接复制到任何页面直接使用,代码为我所用,非我所想
19 Response.Write( " 计算机名: " );
20 Response.Write( " http:// " + HttpContext.Current.Request.Url.Host + HttpContext.Current.Request.ApplicationPath + " <br /> " );
21 Response.Write( " IP地址: " );
22 Response.Write(Request.ServerVariables[ " LOCAl_ADDR " ] + " <br /> " );
23 Response.Write( " 域名: " );
24 Response.Write(Request.ServerVariables[ " SERVER_NAME " ].ToString() + " <br /> " );
25 Response.Write( " 端口: " );
26 Response.Write(Request.ServerVariables[ " Server_Port " ].ToString() + " <br /> " );
27 Response.Write( " 本文件所在路径: " );
28 Response.Write(Request.PhysicalApplicationPath + " <br /> " );
29 Response.Write( " 操作系统: " );
30 Response.Write(Environment.OSVersion.ToString() + " <br /> " );
31 Response.Write( " 操作系统所在文件夹: " );
32 Response.Write(Environment.SystemDirectory.ToString() + " <br /> " );
33 Response.Write( " 脚本超时时间: " );
34 Response.Write((Server.ScriptTimeout / 1000 ).ToString() + " 秒 " + " <br /> " );
35 Response.Write( " 系统语言: " );
36 Response.Write(CultureInfo.InstalledUICulture.EnglishName + " <br /> " );
37 Response.Write( " .NET版本: " );
38 Response.Write( string .Concat( new object [] { Environment.Version.Major, ".", Environment.Version.Minor, Environment.Version.Build, ".", Environment.Version.Revision } ) + " <br /> " );
39 Response.Write( " IE版本: " );
40 RegistryKey key = Registry.LocalMachine.OpenSubKey( @" SOFTWARE/Microsoft/Internet Explorer/Version Vector " );
41 Response.Write(key.GetValue( " IE " , " 未检测到 " ).ToString() + " <br /> " );
42 Response.Write( " 启动到现在已运行: " );
43 Response.Write(((Environment.TickCount / 0x3e8 ) / 60 ).ToString() + " 分钟 " + " <br /> " );
44 Response.Write( " 逻辑驱动器: " );
45 string [] achDrives = Directory.GetLogicalDrives();
46 for ( int i = 0 ; i < Directory.GetLogicalDrives().Length - 1 ; i ++ )
47 {
48 Response.Write(achDrives[i].ToString());
49 }
50 Response.Write( " <br /> " );
51 Response.Write( " CPU 数量: " );
52 Response.Write(Environment.GetEnvironmentVariable( " NUMBER_OF_PROCESSORS " ).ToString() + " <br /> " );
53 Response.Write( " CPU类型: " );
54 Response.Write(Environment.GetEnvironmentVariable( " PROCESSOR_IDENTIFIER " ).ToString() + " <br /> " );
55 Response.Write( " ASP.NET所站内存: " );
56 Response.Write(((Double)Process.GetCurrentProcess().WorkingSet64 / 1048576 ).ToString( " N2 " ) + " M " + " <br /> " );
57 Response.Write( " ASP.NET所占CPU: " );
58 Response.Write(((TimeSpan)Process.GetCurrentProcess().TotalProcessorTime).TotalSeconds.ToString( " N0 " ) + " %<br /> " );
59 Response.Write( " 当前系统用户名: " );
60 Response.Write(Environment.UserName + " <br /> " );
61 %>
62 </ div >
63 </ form >
64 </ body >
65 </ html >