0

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?

Jey
  • 2,137
  • 4
  • 22
  • 40

1 Answers1

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