InvalidCastException se arroja después de instalar ASP.NET MVC 4 beta
-
29-10-2019 - |
Pregunta
Obtengo la siguiente excepción después de instalar ASP.NET MVC 4 beta en una máquina con ASP.NET MVC 3.
System.InvalidCastException no fue manejado por el mensaje del código de usuario = [A] System.web.webpages.razor.configuration.hostSection no se puede lanzar a [b] system.web.webpages.razor.configuration.hostsection. El tipo A se origina en 'System.web.webpages.razor, versión = 1.0.0.0, cultura = neutral, publickeyToken = 31bf3856ad364e35' en el contexto 'predeterminado' en ubicación 'c: windows microsoft.net ensamblaje gac_msil system .Web.webpages.razor v4.0_1.0.0.0__31bf3856ad364e35 system.web.webpages.razor.dll '. El tipo B se origina en 'System.web.webpages.razor, versión = 2.0.0.0, cultura = neutral, publickeyToken = 31bf3856ad364e35' en el contexto 'predeterminado' en ubicación 'c: windows microsoft.net ensamblaje gac_msil system .Web.webpages.razor v4.0_2.0.0.0__31bf3856ad364e35 system.web.webpages.razor.dll '. Fuente = system.web.webpages.razor
Stacktrace:
en system.web.webpages.razor.webrazorhostFactory.getrazorsection (string virtualPath) en system.web.webpages.razor.webrazorhostfactory.createhostFromConfig (String virtualPath, string físico) en system.web.webpages.razor.razorbuildPathFromEdRider.GOTFROMTROMTROM () System.Web.WebPages.Razor.RazorBuildProvider.CreateHost() at System.Web.WebPages.Razor.RazorBuildProvider.EnsureGeneratedCode() at System.Web.WebPages.Razor.RazorBuildProvider.get_CodeCompilerType() at System.Web.Compilation.BuildProvider. GetCompilerTypeFrombuildProvider (BuildProvider BuildProvider) en System.web.compilation.BuildProvidersCompiler.ProcessBuildProviders () en System.web.compilation.BuildProvidersCompiler.performBuild () en System.web.compilation.buildmanager.compilildweBilpat.Cervirt.CRATRATIMATATIMATATIVA. BuildManager.getVpathBuildresultInternal (virtualpath virtualpath, boolean nobuild, boolean tethcrossapp, boolean permitido en caso t System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean todcrossapp, boolean throwifnotFound) en System.web.mvc.buildmanagerwrapper.system.web.mvc.ibuildmanager.fileExists (String virtualPath) en system.web.mvc.buildmanagiewengine.fileeExists (controlerContext Controlyercontex .VirtualPathPathProviderviewEngine.getPathFromGeneralName (ControllerContext ControllerText, List`1 ubicaciones, name de cadena, cadena controleName, string areaname, string cachekey, string [] y búsqueda delocations) en System.web.mv.virtualPathPathProvidEviewEngine.getPath (ControllerContextExtExtext, String [] Locations, Locations, String [] Arealocations, String ubicaciones de StringPropertyname, S Nombre de Tring, String ControlerName, String CachekyyPRefix, Boolean USECACHE, String [] & SearchedLocations) en System.web.mvc.virtualPathPathProviderviewEngine.findView (ControllerContext ControleContext, String ViewName, String MasterName, Boolean Usecache) en System.web.mvc.ViewenCollection. <> c__displayclassc.b__b (iviewengine e) en system.web.mvc.viewengineCollection.find (Func`2 Lookup, Boolean TrackSearchedPaths) en System.web.mvc.viewenginecollection.FindView (ControllerConteContext ControlerContex .WEB.MVC.ViewResult.FindView (contexto de ControllerContext) en System.Web.MVC.ViewResultbase.ExecUterSult (ControlyerContext context) en System.Web.MVC.ControllerActionInvoker.InvokeActionResult (ControllerContextExtEXTERTEXTEXT, ActionResult ActionResult) At System.Mvoke. ControleractionInvoker. <> C__displayclass1c.b__19 () en system.web.mvc.ControllerActionInvoker.invokeActionResultFilter (IRESULTFILTER FILTER, resultando contexting precontext, diversión C`1 Continuación) en System.Web.MVC.ControllerActionInvoker. <> C__DisplayClass1c. <> C__DisplayClass1e.b__1b () en System.Web.MVC.ControllerActionInvoker.InvokeActionResSesultWithFilters (ControlyEnTextText ACTROLTONTEXT, ilist`1 Filters, ActionVoker. Web.mvc.ControllerActionInvoker.inVokeaction (ControllerContext ControleContext, String ActionName) en System.Web.MVC.Controller.ExecuteCore () en [Project_Namespace] .Controllers.GlobalizationController.executecore () en [File_Path] en System.Web.MVC.ControllerBaseBaseBaseBaseBaseBaseBASE .Execute (requestContext requitContext) en System.web.mvc.ControllerBase.system.web.mvc.icontroller.execute (requestContext requestContext) en System.web.mvc.mvchandler. <> C__displayclass6. <> C__dislayclassb.b__5 () en el sistema en el sistema .Web.mvc.Async.AsyncResultWrapper. <> C__displayclass1.b__0 () en System.Web.Mvc.Async.AsyncResultWrapper. <> C__displayclass8`1.b__7 (iAyncressulressultUsulty `1.end () en System.Web.MVC.MVCHANDLER <> c__displayclasse.b__d () en system.web.mvc.securityUtil.b__0 (acción f) en system.web.mvc.securityutil.processinApplicationTrust (Action Action) en System.Web.MVC.MVCHANDLER.EndprocessRequest (iaSyncresUlt) en System.Web.MVC.MVCHANDLER.SYSTEM.WEB.IHTTPASYNCHANDLER.ENDPROCESSREQUEST (IAsyncResult) en System.web.httpapplication.callhandlerExeStep.system.web.httpapplication.iExecutionstep.ExEcute () en System.WePAptatationhtatationhattatation paso, booleano y completado sincronamente)
Esto me bloquea por completo y, aunque me gustaría mantener la versión beta, podría necesitar eliminarla por completo para deshacerme de la excepción.
No hay solución correcta