HttpContext.Current.Request.Url.Authority in NLB

  • Thread starter Thread starter Billy Zhang
  • Start date Start date
B

Billy Zhang

I have a NLB environment. 102 and 103 are the two machines' IP.
107 is the virtual IP. I used below code to get the URI.

public static string GetEnvironment()
{
return "http://" +
HttpContext.Current.Request.Url.Authority +
HttpContext.Current.Request.ApplicationPath.TrimEnd('/') + "/";
}

The problem is that:

sometimes I got 107, and sometimes I got 102. Why?
 
Hi Billy,

Regarding on this issue, I have replied you in another post you posted
earilier. Please feel free to have a look there.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).
 
Back
Top