ASP.NET MVC:沒有為此對象定義的無參數(shù)構(gòu)造函數(shù)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: }我正在關(guān)注Steven Sanderson的“ Pro ASP.NET MVC框架 ”一書。在頁132,根據(jù)作者的建議,我下載了ASP.NET MVC Futures程序集,并將其添加到我的MVC項目中。[注意:這可能是一個紅鯡魚。]在此之后,我無法再加載我的項目。上面的錯誤阻止了我。我的問題不是,“你能幫我解決一下我的代碼嗎?”相反,我想更全面地了解:我該如何解決這個問題?我應(yīng)該尋找什么?根本原因是什么?看起來我應(yīng)該比現(xiàn)在更深入地了解路由和控制器。
ASP.NET MVC:沒有為此對象定義的無參數(shù)構(gòu)造函數(shù)
開心每一天1111
2019-08-08 15:14:08