Server Error in '/' Application.
--------------------------------------------------------------------------------
No parameterless constructor defined for this object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.MissingMethodException: No parameterless constructor defined for this object.
Source Error:
Line 16: HttpContext.Current.RewritePath(Request.ApplicationPath, false);
Line 17: IHttpHandler httpHandler = new MvcHttpHandler();
Line 18: httpHandler.ProcessRequest(HttpContext.Current);
Line 19: HttpContext.Current.RewritePath(originalPath, false);
Line 20: }
我一直在关注史蒂文 · 桑德森的《 ASP.NET MVC Framework》一书。在第132页,根据作者的建议,我下载了 ASP.NET MVC Futures 程序集,并将其添加到我的 MVC 项目中。[注意: 这可能是一条转移注意力的鲱鱼。]
在这之后,我不能再加载我的项目。以上的错误停止了我冷。
我的问题是 没有,“你能帮我修复我的代码吗?”
相反,我想更全面地了解:
看起来我应该比现在更深入地理解路由和控制器。