ASP.NET MVC Application Execution Process

Stage Details Receive first request for the application In the Global.asax file, Route objects are added to the  RouteTable object. Perform routing The UrlRoutingModule module uses the first matching Route object in the RouteTable collection to create the RouteData object, which it then uses to create a RequestContext object. Create MVC request handler The MvcRouteHandler … Continue reading ASP.NET MVC Application Execution Process

Request.ApplicationPath is not working

Sometime Request.ApplicationPath  does not work with all browser properly  , so use this.Request.Url.GetLeftPart(UriPartial.Authority) instead. Lets get it by example: If we use Request.ApplicationPath‘” + Request.ApplicationPath + “/Massimo/ProductDetails.aspx”‘); It will be rendered as http://Massimo/ProductDetails.aspx that i do not want If we use Request.Url.GetLeftPart(UriPartial.Authority) then it will be rendered as  http://ServerName/Massimo/ProductDetails.aspx that is what we want. … Continue reading Request.ApplicationPath is not working