I recently created an MVC2 application. I am having trouble bringing it up on a Windows 2003 Server running IIS 5.2. My developing machine is Server 2008, so no problems there.
Changes I made on Server 2003 is Creating a Wildcard Script Map of * and pointing that to: c:\windows\microsoft.net\framework\v4.0.30319\aspnet_isapi.dll
I am getting an HTTP 403 Forbidden page.
I created a separate apppool and am running that using .Net 4
Here is my global.asax
routes.MapRoute(
"Default", // Route name
"{controller}.mvc/{action}/{id}", // URL with parameters
new { action = "Index", id = "" } // Parameter defaults
);
routes.MapRoute(
"Root", // Route name
"", // URL with parameters
new { controller = "Home", action = "Index", id = "" } // Parameter defaults
);
I have similar problem while trying to get working my MVC2 application on IIS 5.1 server. I have lost many hours but finally I got it working.
Your Global.asax looks good, but there is one another thing. On IIS server there is missing mapping for .mvc files. You have to add this in order to get your app works.
Go to you IIS, then roll-up
Web sitesand right click onDefault Web Siteand selectHome directory. Now click onConfigurebutton. Click onAddin order to add new mapping extension.In
Executablefield paste your path toaspnet_isapi.dllfile. Usually it’s underC:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll.In
Extensionfield write.mvc.At tasks (I may be wrong about this name, cause I’m not using English version of IIS) mark second option and paste
GET,HEAD,POST,DEBUG.Mark 2 checkboxes at bottom.
Now you can save it by clicking on OK button.
One tip at the end. If OK button is disabled then just click on a field with
Executablesand it should be enabled then.Edit Here’s another tip. It is quite problematic to run MVC application under IIS 5.x. You have to be careful with all paths. For example to include jQuery library in
SiteMasterpage you have to use:Hope this works for you and it saved you some time 🙂