2013-08-05 120 views
1

如何获取运行asp.net应用程序的IIS框的IP地址?我试过了:如何获取服务器的IP地址?

HttpContext.Current.Request.ServerVariables["SERVER_NAME"]; 

这是不是可能?

+0

检查此[链接](http://stackoverflow.com/questions/646525/getting-the-ip-address-of-服务器在ASP网)帮助。 – Nilesh

+0

感谢那个家伙 – user603007

回答

0

Here都是变量:

HttpContext.Current.Request.UserHostAddress; should work 

Link 1