ASP.NET MVC 3 ile bir makineye ASP.NET MVC 4 Beta yükledikten sonra aşağıdaki istisnayı alıyorum.
System.InvalidCastException kullanıcı kodu tarafından işlenmedi Message = [A] System.Web.WebPages.Razor.Configuration.HostSection, [B] System.Web.WebPages.Razor.Configuration.HostSection'a dönüştürülemiyor. Tür A, 'C: \ Windows \ Microsoft.Net \ assembly \ GAC_MSIL \ System konumunda' Varsayılan 'bağlamında' System.Web.WebPages.Razor, Version = 1.0.0.0, Culture = nötr, PublicKeyToken = 31bf3856ad364e35 'kaynağından kaynaklanır .Web.WebPages.Razor \ v4.0_1.0.0.0__31bf3856ad364e35 \ System.Web.WebPages.Razor.dll '. Tip B, 'C: \ Windows \ Microsoft.Net \ assembly \ GAC_MSIL \ System konumunda' Varsayılan 'bağlamında' System.Web.WebPages.Razor, Version = 2.0.0.0, Culture = nötr, PublicKeyToken = 31bf3856ad364e35 'kaynağından kaynaklanır .Web.WebPages.Razor \ v4.0_2.0.0. 0__31bf3856ad364e35 \ System.Web.WebPages.Razor.dll '. Kaynak = System.Web.WebPages.Razor
Yığın izleme:
System.Web.WebPages.Razor.WebRazorHostFactory. System.Web.WebPages.Razor.RazorBuildProvider.EnsureGeneratedCode () şirketinde System.Web.WebPages.Razor.RazorBuildProvider.CreateHost (), System.Web.WebPages.Webompilation. System.Web.Compilation.BuildProvidersCompiler.ProcessBuildProviders () at System.Web.Compilation.BuildProvidersCompiler.PerformBuild () at System.Web.Compilation.BuildManager'da GetCompilerTypeFromBuildProvider (BuildProvider buildProvider).CompileWebFile (VirtualPath virtualPath at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal (VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean sureIsUpTes System.Web.Compilation.BuildManager.GetVPathBuildResultInternal) , Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean sureIsUpToDate) System.Web.Compilation.BuildManager. System.Web.Mvc.BuildManagerViewEngine adresinde Web.Mvc.IBuildManager.FileExists (String virtualPath).System.Web.Mvc.VirtualPathProviderViewEngine.GetPathFromGeneralName'de FileExists (ControllerContext controllerContext, String virtualPath) System.Web adresinde (ControllerContext controllerContext, List`1 lokasyonları, String adı, String controllerName, String alanAdı, String cacheKey, String [] ve arananLocations). Mvc.VirtualPathProviderViewEngine.GetPath (ControllerContext controllerContext, String [] konumları, String [] alanLokasyonları, Dize konumlarıPropertyName, Dize adı, Dize denetleyiciAdı, Dize cacheKeyPrefix, Boolean useCache, String [] & searchedLocations) System.Web.Mvc.VirtualPathPathPath (ControllerContext controllerContext, String viewName, String masterName, Boolean useCache) System.Web.Mvc.ViewEngineCollection. <> C__DisplayClassc.System.Web.Mvc.ViewEngineCollection.Find (Func`2 arama, Boolean trackSearchedPaths) at System.Web.Mvc.ViewEngineCollection.FindView (ControllerContext controllerContext, String viewName, String masterName) System.Web.Mvc adresinde b__b (IViewEngine e) System. System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter (IResultFilter filtresi, ResultExecutingContext preContext, Func`1 devamı) at System.Web.Mvc.ControllerActionInvoker1c <. c__DisplayClass1c.b__19 () <.> System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters'da (ControllerContext controllerContext, IList`1 filtreleri, ActionResult actionResult) System.Web.Mvc.ControllerAction.Webtext denetleyicisinde (. Mvc.Controller.ExecuteCore (), [project_namespace] .Controllers.GlobalizationController.ExecuteCore (), System.Web.Mvc.ControllerBase.Execute (RequestContext requestContext), System.Web.Mvc.ControllerBase.System.Web. System.Web.Mvc.MvcHandler'da Mvc.IController.Execute (RequestContext requestContext). <> C__DisplayClass6. <> C__DisplayClassb.b__5 () at System.Web.Mvc.Async.AsyncResultWrapper. <> C__DisplayClass1.b__0 Web.Mvc.Async.AsyncResultWrapper. <> C__DisplayClass8`1.b__7 (IAsyncResult _) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.End () at System.Web.Mvc.MvcHandler. <> C__DisplayClasse. System.Web.Mvc.SecurityUtil.b__0 (Eylem f) System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust (Eylem eylemi) System.Web.Mvc.MvcHandler.EndProcessRequest (IAsyncResult asyncResult), System.Web.Mvc.MvcHandler. System.Web.IHttpAsyncHandler.EndProcessRequest (IAsyncResult sonucu) System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.System.Web.Mvc.MvcHandler'da Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.End (). <> C__DisplayClasse.b__d () at System.Web.Mvc.SecurityUtil.b__0 (Action f) System.Web. System. CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute () at System.Web.HttpApplication.ExecuteStep (IExecutionStep step, Boolean & completeSynchronously)System.Web.Mvc.MvcHandler'da Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.End (). <> C__DisplayClasse.b__d () at System.Web.Mvc.SecurityUtil.b__0 (Action f) System.Web. System. CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute () at System.Web.HttpApplication.ExecuteStep (IExecutionStep step, Boolean & completeSynchronously)System.Web.Mvc.MvcHandler.EndProcessRequest (IAsyncResult asyncResult) at System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust (Action eylem) at System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHand'de b__0 (Action f) System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.System.Web.Mvc.MvcHandler.EndProcessRequest (IAsyncResult asyncResult) at System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust (Eylem eylemi) System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHand adresindeki b__0 (Action f) System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.System.Web.HttpApplication.ExecuteStep adresinde HttpApplication.IExecutionStep.Execute () (IExecutionStep step, Boolean & completeSynchronously)System.Web.HttpApplication.ExecuteStep adresinde HttpApplication.IExecutionStep.Execute () (IExecutionStep step, Boolean & completeSynchronously)
Bu beni tamamen engelledi ve betayı korumak istesem de istisnadan kurtulmak için onu tamamen kaldırmam gerekebilir.