• Asp.net Request方法获取客户端的信息


    Response.Write("客户端计算机名:" + Request.UserHostName + "<BR />");  
    Response.Write("客户端IP:" + Request.UserHostAddress + "<BR />");  
    Response.Write("浏览器:" + Request.Browser.Browser + "<BR />");  
    Response.Write("浏览器版本:" + Request.Browser.Version + "<BR />");  
    Response.Write("浏览器类型:" + Request.Browser.Type + "<BR />");  
    Response.Write("客户端操作系统:" + Request.Browser.Platform + "<BR />");  
    Response.Write("是否支持Java:" + Request.Browser.JavaApplets + "<BR />");  
    Response.Write("是否支持框架网页:" + Request.Browser.Frames + "<BR />");  
    Response.Write("是否支持Cookie:" + Request.Browser.Cookies + "<BR />");  
    Response.Write("客户端.NET Framework版本:" + Request.Browser.ClrVersion + "<BR />");  
    Response.Write("JScript版本:" + Request.Browser.JScriptVersion + "<BR />");  
      
      
    Response.Write("请求的虚拟路径:" + Request.Path + "<BR />");  
    //Response.Write("title:" + Request.He + "<BR />");  
    for(int i=0;i<Request.Headers.Count;i++){  
    Response.Write(Request.Headers.Keys[i]+":"  + Request.Headers[Request.Headers.Keys[i]]+ "<BR />");  
    }  
    Response.Write("请求的物理路径:" + Request.PhysicalPath + "<BR />");  

      
    Response.Write("浏览器类型和版本:" + Request.ServerVariables["HTTP_USER_AGENT"] + "<BR />");  
    Response.Write("用户的IP地址:" + Request.ServerVariables["REMOTE_ADDR"] + "<BR />");  
    Response.Write("请求的方法:" + Request.ServerVariables["REQUEST_METHOD"] + "<BR />");  
    Response.Write("服务器的IP地址:" + Request.ServerVariables["LOCAL_ADDR"] + "<BR />");  
  • 相关阅读:
    C++ Primer 随笔 Chapter 2 变量和基本类型
    比较全面的gdb调试命令 (转载)
    open和fopen的区别(转)
    来了
    Function语义学之member function
    TCP/IP学习(四)TCP缓冲区大小及限制(转)
    TCP连接的建立和终止
    Data 语义学(2)
    Data 语义学(1)
    一个类到底有多大?
  • 原文地址:https://www.cnblogs.com/itecho/p/2338138.html
Copyright © 2020-2023  润新知