• ASP.NET 2.0 探针


    ASP.NET 2.0 探针源码:

    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default4.aspx.cs" Inherits="Default4" %> 
    <%@ Import Namespace="System.Diagnostics" %> 
    <%@ Import Namespace="Microsoft.Win32" %> 
    <%@ Import Namespace="System.Globalization" %> 
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    <html xmlns="http://www.w3.org/1999/xhtml" > 
    <head runat="server"> 
        <title>ASP.NET2.0探针</title> 
    </head> 
    <body> 
        <form id="form1" runat="server"> 
         计算机名: 
       http://<%=HttpContext.Current.Request.Url.Host%> <%=HttpContext.Current.Request.ApplicationPath %><br /> 
        IP地址: 
       <%= Request.ServerVariables["LOCAl_ADDR"]  %><br /> 
          域名: 
        <%= Request.ServerVariables["SERVER_NAME"]%><br /> 
         端口: 
         <%=Request.ServerVariables["Server_Port"].ToString() %><br /> 
         本文件所在路径: 
          <%= Request.PhysicalApplicationPath %><br /> 
            操作系统: 
           <%= Environment.OSVersion.ToString()%> <br /> 
           操作系统所在文件夹: 
           <%=Environment.SystemDirectory.ToString() %> <br /> 
            脚本超时时间: 
           <%=(Server.ScriptTimeout / 1000).ToString() %> 秒<br /> 
           系统语言: 
            <%=CultureInfo.InstalledUICulture.EnglishName %><br /> 
            .NET版本:  
        <%= Environment.Version.Major%>.<%=Environment.Version.Minor%>. 
       <%= Environment.Version.Build%>.<%= Environment.Version.Revision%> <br /> 
           IE版本: 
       <% RegistryKey key = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Internet Explorer\Version Vector"); %>     
           <%=key.GetValue("IE", "未检测到").ToString() %><br /> 
            启动到现在已运行: 
           <%=((Environment.TickCount / 0x3e8) / 60).ToString() %> 分钟<br /> 
        
            CPU 数量: 
           <%= Environment.GetEnvironmentVariable("NUMBER_OF_PROCESSORS").ToString()%> <br /> 
           CPU类型: 
           <%=Environment.GetEnvironmentVariable("PROCESSOR_IDENTIFIER").ToString() %> <br /> 
           ASP.NET所站内存: 
          <%=((Double)Process.GetCurrentProcess().WorkingSet64 / 1048576).ToString("N2") %> M<br /> 
          ASP.NET所占CPU: 
        <%= ((TimeSpan)Process.GetCurrentProcess().TotalProcessorTime).TotalSeconds.ToString("N0")%> %<br /> 
           当前系统用户名: 
          <%=Environment.UserName %><br /> 
        </form> 
    </body> 
    </html> 
    
  • 相关阅读:
    JavaScript实现继承的几种方式总结一
    MyISAM key 压缩
    Visual Studio2010英文版安装中文帮助文档
    回忆我是怎样走上程序之路的(上)起因
    hdu2054 A==B
    顺序表的增删排序
    hdu2145 zz's Mysterious Present
    hdu 2141 Can you find it?
    hdu1162 Eddy's picture
    hdu1142 A Walk Through the Forest
  • 原文地址:https://www.cnblogs.com/shlcn/p/2112762.html
Copyright © 2020-2023  润新知