My website is placed in 8 different IIS servers and controlled using load balancer. When i request any page, I would like to identify which IIS server (IP or domain name)responds the request? How to do this in ASP.Net MVC web application?
Asked
Active
Viewed 220 times
1 Answers
6
You can get the machine you are currently running code on from the current HttpContext
.
HttpContext.Current.Server.MachineName

Nikola Dimitroff
- 6,127
- 2
- 25
- 31
-
Should `HttpContext` be used explicitly in `MVC` ? – Imad Alazani Jul 25 '13 at 17:17