zoukankan      html  css  js  c++  java
  • C#中如何获取服务器IP,名称,操作系统,客户端IP,名称!

    客户端ip:
    Request.ServerVariables.Get("Remote_Addr").ToString();
    客户端主机名:
    Request.ServerVariables.Get("Remote_Host").ToString();
    客户端浏览器IE:
    Request.Browser.Browser;
    客户端浏览器 版本号:
    Request.Browser.MajorVersion;//
    客户端操作系统:
    Request.Browser.Platform;

    服务器ip:
    Request.ServerVariables.Get("Local_Addr").ToString();
    服务器名:
    Request.ServerVariables.Get("Server_Name").ToString();

    如果你想进一步了解ServerVariables,可以用
       foreach(String o in Request.ServerVariables){
        Response.Write(o+"="+Request.ServerVariables[o]+"<br>");
       }
  • 相关阅读:
    网站
    世上本无事,庸人自扰之
    mac系招聘BBS
    新浪微博语录帝摘录
    dwz jui
    cheap vps
    facebook的开发标准
    rails的一些插件
    租房宝
    在Z10上用3G
  • 原文地址:https://www.cnblogs.com/xlfj521/p/930654.html
Copyright © 2011-2022 走看看