If there is a need to get the URI that the was used to reach the controller then the Request holds that information and it can be retrieved to a URI object
public ActionResult MyAction() { var uri = Request.Url; var port = uri.Port; var absoluteUri = uri.AbsoluteUri //... do things here return View(); } |
Pingback: MVC3 check what url was called (regardless of server/interface) « Jontas