开发者

ASP.NET MVC 2 Preview 2 under Mono in Linux

I am actually successful开发者_Go百科ly running a production website with ASP.NET MVC under Mono in a Ubuntu LTS Linux. This server is located somewhere in the cloud and it rocks!

Today, I have tried to make it all work with ASP.NET MVC 2 Preview 2, which can be found here: ASP.NET MVC 2 Preview 2

I have downloaded the source code because I wanted to deploy the DLL by hand just like I am doing with v1. I find it simpler Linux not to rely on the GAC.

Everything seems to be working fine until I try to get JSON data in an AJAX call. Here is the information I get about the error...

[System.NotImplementedException]: The requested feature is not implemented. at System.Web.Mvc.AssociatedMetadataProvider.GetTypeDescriptor (System.Type type) [0x00000] at System.Web.Mvc.AssociatedMetadataProvider.GetMetadataForType (System.Func`1 modelAccessor, System.Type modelType) [0x00000] at System.Web.Mvc.ControllerActionInvoker.GetParameterValue (System.Web.Mvc.ControllerContext controllerContext, System.Web.Mvc.ParameterDescriptor parameterDescriptor) [0x00000] at System.Web.Mvc.ControllerActionInvoker.GetParameterValues (System.Web.Mvc.ControllerContext controllerContext, System.Web.Mvc.ActionDescriptor actionDescriptor) [0x00000] at System.Web.Mvc.ControllerActionInvoker.InvokeAction (System.Web.Mvc.ControllerContext controllerContext, System.String actionName) [0x00000]


The feature your trying to use is not implemented. The fix would be to actually implement the feature your looking for.

Wait...

Are you using return type of JsonResult instead of ActionResult for your controller actions? Something is trying to populate the meta data about the model your passing to the view. I think if your returning JSON that piece of functionality, the metadata population, shouldn't happen.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜