質問

ASP.NET MVC 3を搭載したマシンにASP.NET MVC 4ベータをインストールした後、次の例外を取得します。

System.InvalidCastExceptionは、ユーザーコードメッセージ= [a] System.web.webpages.razor.configuration.hostsectionを[b] system.web.webpages.razor.configuration.hostsectionにキャストできません。タイプAは、 'System.Web.WebPages.Razor、Version = 1.0.0.0、Culture = neutral、publicKeyToken = 31BF3856AD364E35' in Context 'default' in location "c: windows microsoft.net assemble systemに由来します。 .web.webpages.razor v4.0_1.0.0.0__31bf3856ad364e35 system.web.webpages.razor.dll '。タイプBは、 'System.web.webpages.razor、version = 2.0.0.0、culture = neutral、publickeytoken = 31bf3856ad364e35' in context 'default' in location "c: windows microsoft.net assemble systemに由来します。 .web.webpages.razor v4.0_2.0.0.0__31bf3856ad364e35 system.web.webpages.razor.dll '。 source = system.web.webpages.razor

スタックトレース:

System.web.webpages.razor.webrazorhostfactory.getRazoresection(String VirtualPath)at System.Web.Webpages.Razor.WebrazorhostFactory.CreateHostfromConfig(String VirtualPath、String PhysicalPath)at System.Web.Web.Webpages.razor.razor.razorbuildpromconprovider.gethprovidebider. System.web.webpages.razor.razorbuildprovider.createhost()at System.Web.Webpages.Razor.RazorBuildProvider.EnsureGeneratedCode()at System.Web.Webpages.Razor.RazorBuildProvider.get_Codecompilertype()P.PILINETYPE()aTPILTILETYPIMEDPILETYPILETYPIMER.GET_CODECOMPROVIDER.GET_CODECOMPROVIDER.GET_CODECOMPROVIDER.GET_CODECOMPROVider getCompilerTypeFrombUildProvider(BuildProvider BuildProvider)at System.Web.comPilation.BuildProvidersCompiler.ProcessBuildProviders()at System.Web.comPilation.BuildProvidersCompiler.PerformBuild()at System.web.compationagepimationagepimationagedimepilationaged.bidimagemepilationaged.bidimagemepilation.compilation.compilation compilation compilati BuildManager.getVPathBuildResultInternal(VirtualPath VirtualPath、Boolean nobuild、boolean lockCrossApp、boolean aclowbuildinprecompile、boolean throwifnotfound、boolean suseerisuptodate) T System.Web.comPilation.BuildManager.getVPathBuildResultWithNoAssert(httpContextコンテキスト、VirtualPath VirtualPath、Boolean nobuild、boolean lockcrossapp、boolean apposebuildinprecompile、boolean swarifnotfound、buoleas hulisuptodate.webcompatisedatedate.buolean buolean buolean buolean allowCrossApp, Boolean throwIfNotFound) at System.Web.Mvc.BuildManagerWrapper.System.Web.Mvc.IBuildManager.FileExists(String virtualPath) at System.Web.Mvc.BuildManagerViewEngine.FileExists(ControllerContext controllerContext, String virtualPath) at System.Web.Mvc .virtualpathproviderviewengine.getPathfromGeneralName(ControllerContext ControllerContext、List`1 Locations、String Name、String Controlnermame、String Areaname、String Cachekey、SearchedLocations) string [] arealocations、string locationspropertyname、s Tring Name、String Controllname、String CacheKeyprefix、Boolean Usecache、String []&SearchedLocations)at System.Web.MVC.VirtualPathProviderViewEngine.findView(ControllerContext ControllerContext、String Viewname、String MasterName、Boolean Usecache) <> c__displayclassc.b__b(iviewengine e)at System.web.mvc.viewenginecollection.find(func`2 lookup、boolean tracksearchedpaths)at system.web.mvc.viewenginecollection.findview(controllercontext controllercontext、String viewname、String Mastername) .web.mvc.viewresult.findview(Controllercontext Context)at System.web.viewResultBase.Executeresult(ControllerContext Context)at System.Web.MVC.ControlrercationInvoker.InvokeactionResult(ControllerContext ControllerContext、ActionResultultult) ControllerActionInvoker。<> c__displayclass1c.b__19()at System.web.mvc.controlleractioninvoker.invokeactionResultFilter(iresultFilterフィルター、結果登録済みコントテクスト、プレクテキスト、楽しみc`1 Continuation)at System.Web.Mvc.ControllerActionInvoker。<> c__displayclass1c。<> c__displayclass1e.b__1b()at System.web.mvc.controllerRearreractioninvoker.invokeactionResresultwithfilters(controneRercontext contronercontext、act Ats Ats acts contructext web.mvc.controlleractioninvoker.invokeaction(controllercontext controllercontext、string actionname)at system.web.mvc.controller.executecore()at [project_namespace] .controllers.globalizationController.executecore()in [file_path] .execute(requestContext requestContext)at System.web.mvc.controllerbase.system.web.mvc.icontroller.execute(requestcontext requestcontext)at system.web.mvc.mvchandler。 .web.mvc.async.asyncresultwrapper。<> c__displayclass1.b__0()at System.web.mvc.async.asyncreSultwrapper。 `1.End()at System.Web.MVC.MVChandler 。<> c__displayclasse.b__d()at system.web.mvc.securityutil.b__0(アクションF)System.web.mvc.securityutil.processinapplication(アクションアクション) System.web.mvc.mvchandler.system.web.ihttpasynchandler.endprocessRequest(iasyncresult result)at System.web.httpapplication.callhandLerexecutionStep.System.web.httpapplication.ixexecutedecute atecute()at Systemステップ、ブールアンド&完成した施行)

これは私を完全にブロックし、ベータ版を保持したい間、例外を取り除くために完全に削除する必要があるかもしれません。

正しい解決策はありません

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top