asp.net-mvc – ASP.NET MVC Preview 5 on Mono

有没有人有任何有关获取当前版本的ASP.NET MVC(Preview 5)在Mono 2.0上工作的信息?有旧版本的信息(预览2,也许是预览3),但是我没有看到关于使Preview 5实际工作的细节.

Mono Project Roadmap表示Mono 2.4(明年)的ASP.NET 3.5.那么有什么想法呢?

更多细节:基本的MVC Preview 5模板似乎工作,只要我避免根目录.如果我要求根,我得到:

Server Error in '/' Application
The virtual path '' maps to another application.

Description: HTTP 500. Error processing request.

Stack Trace:

System.Web.HttpException: The virtual path '' maps to another application.
  at System.Web.HttpContext.RewritePath (System.String filePath,System.String pathInfo,System.String queryString,Boolean setClientFilePath) [0x00000] 
  at System.Web.HttpContext.RewritePath (System.String path,Boolean rebaseClientPath) [0x00000] 
  at System.Web.HttpContext.RewritePath (System.String path) [0x00000] 
  at MvcApplication1._Default.Page_Load (System.Object sender,System.EventArgs e) [0x00000] 
  at System.Web.UI.Control.OnLoad (System.EventArgs e) [0x00000] 
  at System.Web.UI.Control.LoadRecursive () [0x00000] 
  at System.Web.UI.Page.ProcessLoad () [0x00000] 
  at System.Web.UI.Page.ProcesspostData () [0x00000] 
  at System.Web.UI.Page.InternalProcessRequest () [0x00000] 
  at System.Web.UI.Page.ProcessRequest (System.Web.HttpContext context) [0x00000] 

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

解决方法

那么一个潜力就是RewritePath到/有某种错误,所以只是避免这种情况.将RewritePath(Request.ApplicationPath)更改为:
HttpContext.Current.RewritePath("/Home/Index");

似乎解决了这个问题,至少演示了迄今为止.

相关文章

这篇文章主要讲解了“WPF如何实现带筛选功能的DataGrid”,文...
本篇内容介绍了“基于WPF如何实现3D画廊动画效果”的有关知识...
Some samples are below for ASP.Net web form controls:(fr...
问题描述: 对于未定义为 System.String 的列,唯一有效的值...
最近用到了CalendarExtender,结果不知道为什么发生了错位,...
ASP.NET 2.0 page lifecyle ASP.NET 2.0 event sequence cha...