码迷,mamicode.com
首页 > Web开发 > 详细

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

时间:2014-08-12 18:37:34      阅读:219      评论:0      收藏:0      [点我收藏+]

标签:style   blog   http   color   java   os   io   for   

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 />"); 

 

Asp.net Request方法获取客户端的信息,布布扣,bubuko.com

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

标签:style   blog   http   color   java   os   io   for   

原文地址:http://www.cnblogs.com/shuaixf/p/3907868.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!