Question

J'obtiens l'exception suivante après avoir installé ASP.NET MVC 4 Beta sur une machine avec ASP.NET MVC 3.

System.InvalidCastException a été insuffisant par le code utilisateur Message = [A] System.Web.WebPages.Razor.Configuration.HostSection ne peut pas être jeté sur [B] System.Web.WebPages.Razor.Configuration.HostSection. Le type A provient de 'System.Web.WebPages.Razor, Version = 1.0.0.0, Culture = Neutral, PublicKeyToken = 31BF3856AD364E35' Dans le contexte 'Default' à Location 'C: Windows Microsoft.Net Assembly GAC_MSIL System .Web.webpages.razor v4.0_1.0.0.0__31bf3856ad364e35 system.web.webpages.razor.dll '. Type B provient de 'System.Web.WebPages.Razor, Version = 2.0.0.0, Culture = Neutral, PublicKeyToken = 31BF3856AD364E35' Dans le contexte 'Default' à Location 'C: Windows Microsoft.Net Assembly GAC_MSIL System .Web.webpages.razor v4.0_2.0.0.0__31bf3856ad364e35 system.web.webpages.razor.dll '. Source = System.web.webpages.razor

Trace de la pile:

sur System.web.webpages.razor.webrazorhostfactory.getrazorsection (String virtualpath) sur system.web.webpages.razor.webrazorhostfactory.createhostfromconfig (string virtualpath, string physithpath) sur system.web.webpages.razor.razorbuildProvider.GethOnCon System.web.webpages.razor.razorbuildprovider.createhost () sur System.web.webpages.razor.razorbuildprovider.ensegeneratedcode () sur System.web.webpages.razor.razorbuildprovider.get_codeCompilerType () sur System.web.wailbuder. GetCompilerTypefrombuildProvider (buildProvider BuildProvider) sur System.web.Chompilation.buildProvidersCompiler.processBuildProviders () sur System.Web.Compile.BuildProvidersCompler.performBuild () à System.web.Coilation.Buildmanage.WewewebFile. BuildManager.getvpathBuildResultinternal (virtualpath virtualpath, booléen nobuild, booléen allowcrossapp, booléen pertebuildinprecompile, booléen throwifnotfound, boolean assureispodate) a a t System.web.compilation.buildmanager.getvpathbuildResultwithNoAsersert (HttpContext Context, VirtualPath VirtualPath, Boolean Nobuild, Boolean AllowCrossapp, Boolean AllowbuildInDinprecLE AllowCrossApp, booléen thordifnotfound) sur System.web.mvc.buildmanagerwrapper.system.web.mvc.ibuildmanager.fileexists (String VirtualPath) à System.web.mvc.buildManageViewEngine.FileExists (ControContext ControcerContex .VirtualPathProviderViewEngine.getPathFromGeneralName (ControcerConText ControStroNText, List`1 Locations, String Name, String Controntame, String Areaname, String Cachekey, String [] & SearchEdLocations) sur System.Web.Mvc. String [] aréalocations, string locationspropertyName, s Tring Name, String ControntameName, String cachekeyprefix, boolean useCache, String [] & SearchEdLocations) sur System.web.mvc.VirtualPathProviderViewEngine.FindView (ContropleConText ContropleConText, String ViewName, String MasterName, Boolean UseCache) à System.web.mvc.ViewenEngineCoLeCoLLection. <> c__displayClassc.b__b (iViewEngine e) sur System.web.mvc.ViewEngineCollection.Find (Func`2 Lookup, Boolean TrackSearchedPaths) sur System.web.mvc.ViewEngineCollection.FindView (ControplectConText Contro contrôler, String Viewname, String MasterName) chez System .Web.mvc.ViewResult.FindView (Contexte de ControConText) sur System.web.mvc.ViewResultBase.ExECUTERESULT (ContropleConText Context) à System.Web.Mvc.ControllerActionInvoker.InvokeActionResult (ContrônerContext ControplectContext, ActionResult ActionResult) à System.web.mvc. ControllerActionInvoker. <> C__DisplayClass1c.b__19 () sur System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter (Filter IresultFilter, ResultimeSucutingContex C`1 continuation) sur System.web.mvc.ControllerActionInvoker. <> C__DisplayClass1c. <> C__DisplayClass1e.b__1b () at System.Web.Mvc. Web.mvc.ControllerActionInvoker.InvokeAction (ContropleConText ControConText, String ActionName) sur System.web.mvc.Controller.ExecUpeCore () sur [Project_Namespace] .Controllers.GlobalizationController.ExecUtreCore () dans [File_path] à System.web.Mvc.Contre .Execute (requestContext requestContext) sur System.web.mvc.ControllerBase.System.web.mvc.IController.ExECUTE (requestContext ConquestContext) sur System.web.mvc.mvchandler. <> C__DisplayClass6. .Web.mvc.sync.syncresultwrapper. <> C__displayClass1.b__0 () sur System.web.mvc.sync.7 (IASYNULTWrapper. `1.end () sur System.web.mvc.mvchandler . <> c__displayClasse.b__d () sur System.web.mvc.SecurityUtil.b__0 (Action f) sur System.web.mvc.SecurityUtil.processInApplicationTrust (Action Action) sur System.web.mvc.mvchandler.endprocessrequest (iaSynCresul sur System.web.mvc.mvchandler.system.web.ihttpasynchandler.endprocessRequest (iaSynCresult) sur System.web.httpapplication.callHandlereXecutionStep.system.web.httpapplication.iexecutionStep.Execute () at System.Web.HTPAPPLICATIONS.EXECUTIONSEPSEP Step, booléen et terminé

Cela me bloque complètement et même si je voudrais garder la version bêta, je devrais peut-être le retirer complètement afin de me débarrasser de l'exception.

Pas de solution correcte

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top