Подтвердить что ты не робот

Загрузка этой сборки создаст другой набор грантов из других экземпляров. (Исключение из HRESULT: 0x80131401)

У нас есть серверы SharePoint 2013, которые были исправлены с обновлениями Windows, и с тех пор мы получаем следующую ошибку. Мы перезапустили серверы, вручную удалили обновления Windows, а затем перезапустили серверы, восстановили копию окна сервера до обновления Windows, но ошибка сохраняется. Мы также удалили временные файлы из каталога Windows, и ничто не помогает.

Я добавил скриншот обновлений Windows, которые были применены к нашим серверам за одну ночь введите описание изображения здесь

 Loading this assembly would produce a different grant set from other     instances. (Exception from HRESULT: 0x80131401) 
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.IO.FileLoadException: Loading this assembly would produce a different grant set from other instances. (Exception from HRESULT: 0x80131401)

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: 


[FileLoadException: Loading this assembly would produce a different grant set from other instances. (Exception from HRESULT: 0x80131401)]
System.Linq.Enumerable.Any(IEnumerable`1 source) +0
       System.Web.Compilation.BuildManager.GetPreStartInitMethodsFromAssemblyCollection(IEnumerable`1 assemblies, Boolean buildingFromCache) +210
System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath, Boolean& isRefAssemblyLoaded) +98
System.Web.Compilation.BuildManager.ExecutePreAppStart() +139
System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +1005

[HttpException (0x80004005): Loading this assembly would produce a different grant set from other instances. (Exception from HRESULT: 0x80131401)]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +646
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +159
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +779


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET    Version:4.0.30319.36366 
4b9b3361

Ответ 1

Я столкнулся с тем же исключением при разработке на Sitecore, и iisreset проблему.

Ответ 2

Решение выглядит следующим образом:

Создайте новое значение реестра DWORD под названием LoaderOptimization и дайте ему значение 1 в ключе "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft.NETFramework".

Дальнейшее чтение:

http://blog.bugrapostaci.com/2017/02/08/loading-this-assembly-would-produce-a-different-grant-set-from-other-instances-exception-from-hresult-0x80131401/

https://social.technet.microsoft.com/Forums/en-US/5db05238-3c12-4e7e-af95-ca56545f0721/loading-this-assembly-would-produce-a-different-grant-set-from-other-instances?forum=sharepointgeneral

Ответ 3

Я смог решить эту проблему, зайдя в Bindings → Edit, затем удалив localhost в качестве имени хоста сайта. Работал после этого.