在IIS6主办MVC2 [英] Hosting MVC2 on IIS6
问题描述
我需要一点点帮助。我想主办的IIS6 MVC 2应用程序。在我的开发机(XP),它卡西尼或作为IIS网站完美运行。
I need a little help. I'm trying to host an MVC 2 application on IIS6. On my dev machine (XP) it runs perfectly in Cassini or as web site in IIS.
首先,我想引用.mvc扩展aspnet_isapi但没有工作,我去的ASPX扩展来代替。
First i tried to reference the .mvc extension to aspnet_isapi but when that didn't work i went with the aspx extension instead.
任何想法?我可能错过了一些显而易见的。
Any ideas? I've probably missed something obvious.
public class MvcApplication : HttpApplication
{
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
AreaRegistration.RegisterAllAreas();
routes.MapRoute(
"Default", // Route name
"{controller}.aspx/{action}/{id}", // URL with parameters
new {controller = "Home", action = "Index", id = ""} // Parameter defaults
);
routes.MapRoute(
"Root",
"",
new {controller = "Home", action = "Index", id = ""}
);
}
protected void Application_Start()
{
RegisterRoutes(RouteTable.Routes);
}
}
编辑:
有一些坏的引用,我清理了,现在仍坚持这一我的母版页上:
Had some bad references that i cleaned out and is now stuck with this on my master page:
推荐答案
我想你应该试试这个:
http://haacked.com /archive/2008/11/26/asp.net-mvc-on-iis-6-walkthrough.aspx
I think you should try this: http://haacked.com/archive/2008/11/26/asp.net-mvc-on-iis-6-walkthrough.aspx
这篇关于在IIS6主办MVC2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!