小编mag*_*nus的帖子

在IIS6上托管MVC2

我需要一些帮助.我正在尝试在IIS6上托管MVC 2应用程序.在我的开发机器(XP)上,它在Cassini中完美运行或在IIS中作为网站运行.

首先我尝试将.mvc扩展名引用到aspnet_isapi,但是当这不起作用时,我选择使用aspx扩展名.

有任何想法吗?我可能错过了一些明显的东西.

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);
        }
    }
Run Code Online (Sandbox Code Playgroud)

替代文字

编辑:

有一些不好的引用,我清理了,现在在我的母版页上坚持这个: 替代文字

asp.net-mvc iis-6

5
推荐指数
2
解决办法
9347
查看次数

获取exe以外的错误级别

是否有可能从.net exe获取错误级别以外的返回值?exe是从脚本,批处理或rexx调用的.

如果没有,您可以从批处理或rexx调用程序集中的方法并检索返回值吗?

.net scripting batch-file rexx

0
推荐指数
1
解决办法
193
查看次数

标签 统计

.net ×1

asp.net-mvc ×1

batch-file ×1

iis-6 ×1

rexx ×1

scripting ×1