При обновлении сайта с версии Kooboo 3 на версию 4 может возникнуть следующая ошибка:
Server Error in '/' Application.
Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
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.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.] System.Reflection.RuntimeModule.GetTypes(RuntimeModule module) +0 System.Reflection.RuntimeModule.GetTypes() +9 System.Reflection.Assembly.GetTypes() +143 Kooboo.CMS.Common.Runtime.AppDomainTypeFinder.FindClassesOfType(Type assignTypeFrom, IEnumerable`1 assemblies, Boolean onlyConcreteClasses) +174 [Exception: Could not load file or assembly 'System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) ]
Kooboo.CMS.Common.Runtime.AppDomainTypeFinder.FindClassesOfType(Type assignTypeFrom, IEnumerable`1 assemblies, Boolean onlyConcreteClasses) +868 Kooboo.CMS.Common.Runtime.Dependency.<FindServices>d__1.MoveNext() +105 Kooboo.CMS.Common.Runtime.Dependency.DependencyAttributeRegistrator.RegisterServices(IEnumerable`1 services) +152 Kooboo.CMS.Common.Runtime.DefaultEngine.InitializeContainer() +128 Kooboo.CMS.Common.Runtime.EngineContext.Initialize(Boolean forceRecreate) +185 Kooboo.CMS.Web.MvcApplication.Application_Start() +727 [HttpException (0x80004005): Could not load file or assembly 'System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) ] System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +12863325 System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +175 System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +304 System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +404 System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +475 [HttpException (0x80004005): Could not load file or assembly 'System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) ] System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +12880068 System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +159 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +12721257
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18034
|
Проблема кроется в различных версиях ASP.Net MVC.
Одна из самых вероятных причин - в директории bin проекта kooboo есть библиотеки, скомпилированные под разные ASP.Net MVC версии.
Такое может произойти, если Вы обновили сайт с версии 3 на версию 4, а сайт при этом использовал плагины. Например СustomCaptchaPlugin.dll или другие.
Чтобы устранить ошибку, Вам необходимо удалить библиотеки этих плагинов из директории bin. Все плагины на обновленном сайте должны быть также перекомпилированы под MVC 4.
Если новых версий плагинов под Kooboo 4 у Вас нет, то производить обновление сайта не рекомендуется.
Автор статьи: ©Элла (Автор:Ella Sea)