IIS负载平衡和ASP.Net [英] IIS Load Balancing and ASP.Net
本文介绍了IIS负载平衡和ASP.Net的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
基本上,我有3台服务器,其中1台用作负载平衡服务器.
Basically, I have 3 servers where 1 of them serves as a load balancing server.
在我的ASPX页面中,我想添加一个HTML注释以显示负载均衡器选择的服务器的IP地址甚至主机名.
In my ASPX page, I want to add a HTML comment to show the IP address or even host name of the server selected by the load balancer.
我尝试浏览 IIS服务器变量并尝试使用 SERVER_NAME ,但这只会返回域URL.
I tried looking through IIS Server variables and tried using SERVER_NAME but that just returns the domain URL.
那么,有什么方法可以在ASP.NET中进行此编程? 谢谢!
So, is there any way to do this programming in ASP.NET? Thanks!
推荐答案
System.Environment.MachineName怎么样
How about System.Environment.MachineName
这篇关于IIS负载平衡和ASP.Net的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文