Search code examples
asp.net-mvcurldeploymentweb-farm

Does urls need to constructed dynamically for webfarm?


We are planning to shift our asp .net mvc application to webfarm with loadbalancer,

I am concern about many hardcoded urls available in the application like.

<a href="https://root:xxx/home/index">Index</a>

and

this.RedirectToAction(x=>x.Index());

and

Response.Redirect("~/home/index");

Does this url need to be dynamically constructed inorder to redirect to some specific location, based on RRA algorith.


Solution

  • No, that should be handled by your load balancer. I would expect the code you've shown to work just fine.