Reputation: 361
I've been trying to set a razor web site on iis 7.5 default web site. but when I try to navigate I always get HTTP Error 404.0 - Not Found.
I deployed the site via publish I have set runAllManagedModulesForAllRequests= true. I have have Application Pool in .net 4 integrated mode.
Do I need to install something specific on the server to be able to run razor sites on IIS ?
And the server tells me that this update is not acceptable http://support.microsoft.com/kb/980368 -> "A update is available that enables certain IIS 7.0 or IIS 7.5 handlers to handle requests whose URLs do not end with a period" I am running win server 2008 R2 64 bit.
I am no expert with IIS, the site works perfect in the development server, so any help would be greatly appreciated.
Thanks
Sushibite.
ps. here is RegisterRoutes in Global.asax
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
"Default", // Route name
"{controller}/{action}/{id}", // URL with parameters
new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults
);
routes.MapRoute("Suppliers", "Areas/Suppliers{controller}/{action}/{id}", new { area = "Areas", controller = "Dashboard", action = "Index" });
routes.MapRoute("Administrator", "Areas/Administrator{controller}/{action}/{id}", new { area = "Areas", controller = "Dashboard", action = "Index" });
}
Upvotes: 0
Views: 680
Reputation: 12786
I had a similar problem on our deployment server. After some searching I just installed the MVC 3 tools on the server and the website worked perfectly.
Edit Small note on the side,, put the different maproutes above the default one. Else every route will take the default one. It works from top to bottom and every url would fit in the default route.
See: ASP.Net MVC route mapping
Upvotes: 1