本文介绍了单声道 2.2 上的 ASP.NET mvc的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到了麻烦.我正在尝试在单声道 2.2 上运行 asp.net mvc 1.0.我已将 system.web.mvc.dll 复制到 bin 目录.我已经完成了 HttpContext.Current.RewritePath("/Home/Index");.我仍然有错误:

I am having a trouble. I am trying to run asp.net mvc 1.0 on mono 2.2.I have copied the system.web.mvc.dll to bin directory. I have done HttpContext.Current.RewritePath("/Home/Index");. Still I am having te error:

/"应用程序中的服务器错误传入的请求与任何路由都不匹配

Server Error in '/' Application The incoming request does not match any route

说明:HTTP 500.处理请求时出错.

Description: HTTP 500. Error processing request.

堆栈跟踪:

System.Web.HttpException: 传入请求与 System.Web.Routing.UrlRoutingHandler.ProcessRequest (System.Web.HttpContextBase httpContext) [0x00000] 处 System.Web.Routing.UrlRoutingHandler.ProcessRequest (System.Web.HttpContext httpContext) [0x00000] 在 System.Web.Routing.UrlRoutingHandler.System.Web.IHttpHandler.ProcessRequest (System.Web.HttpContext 上下文) [0x00000] 在 MvcApplication4._Default.Page_Load (System.Object 发件人, System.EventArgs e) [0x00000] 在 System.Web.UI.Control.OnLoad (System.EventArgs e) [0x00000] 在 System.Web.UI.Control.LoadRecursive () [0x00000] 在 System.Web.UI.Page.ProcessLoad() [0x00000] 在 System.Web.UI.Page.ProcessPostData () [0x00000] 在 System.Web.UI.Page.InternalProcessRequest () [0x00000] 在 System.Web.UI.Page.ProcessRequest (System.Web.HttpContext 上下文)[0x00000]

版本信息:单声道版本:2.0.50727.1433;ASP.NET 版本:2.0.50727.1433

Version information: Mono Version: 2.0.50727.1433; ASP.NET Version: 2.0.50727.1433

推荐答案

我终于设法让它运行起来了.似乎 ASP.NET 3.5 MVC 应用程序无需修改即可使用来自 svn 的最新单声道(它们不在单声道 2.2 上).编译的详细说明在这里:http://www.mono-project.com/Compiling_Mono_From_SVN

I have finally managed to get it running. It seems that ASP.NET 3.5 MVC applications work just fine unmodified with the latest mono from svn(they do NOT on mono 2.2).Detailed instructions for compiling it are here: http://www.mono-project.com/Compiling_Mono_From_SVN

显然,您需要将 System.Web.Mvc.dll 复制到应用程序的 bin/子目录中.

Obviously, you need to copy the System.Web.Mvc.dll to the bin/ subdirectory of your application.

如果有人在 32 位 Linux 上需要 Mono 和 xsp,这是我的构建:http://www.speedyshare.com/283727620.html

In case anyone needs Mono and xsp on 32bit Linux, here is my build: http://www.speedyshare.com/283727620.html

更新:2.4 版本已经发布,快去获取吧!

UPDATE: The 2.4 release is out, go get it!

另一个更新:2.6.1 是截至 2010 年 3 月 15 日的最新版本

Another UPDATE: 2.6.1 is the latest release as of 3/15/2010

这篇关于单声道 2.2 上的 ASP.NET mvc的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-04 06:11
查看更多