Sharepoint 加载此程序集将产生与其他实例不同的授权集。(来自HRESULT的异常:0x80131401)

Sharepoint 加载此程序集将产生与其他实例不同的授权集。(来自HRESULT的异常:0x80131401),sharepoint,sharepoint-2013,windows-server-2012-r2,Sharepoint,Sharepoint 2013,Windows Server 2012 R2,我们有使用windows更新修补的SharePoint 2013服务器,从那时起,我们收到以下错误。我们已重新启动服务器,手动删除windows更新,然后重新启动服务器,并在windows更新之前还原到windows server的副本,但错误仍在持续。我们还从Windows目录中删除了临时文件,没有任何帮助 我附上了一张应用于我们服务器的Windows更新的屏幕截图 解决办法似乎是: 创建一个名为LoaderOptimization的新注册表DWORD值,并在“HKEY_LOCAL_MACHI

我们有使用windows更新修补的SharePoint 2013服务器,从那时起,我们收到以下错误。我们已重新启动服务器,手动删除windows更新,然后重新启动服务器,并在windows更新之前还原到windows server的副本,但错误仍在持续。我们还从Windows目录中删除了临时文件,没有任何帮助

我附上了一张应用于我们服务器的Windows更新的屏幕截图


解决办法似乎是:

创建一个名为LoaderOptimization的新注册表DWORD值,并在“HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft.NETFramework”项中为其指定值1

进一步阅读:


我在Sitecore上开发时遇到了相同的异常,一个
iisreset
清除了这个问题。

我可以通过进入绑定->编辑,然后删除“localhost”作为站点的主机名来解决这个问题。在那之后我一直在工作

如果启用了“远程桌面”,请尝试禁用它 ()

运行命令
isreset
并更改注册表后,我的问题解决了


版本信息:Microsoft.NET Framework版本:4.0.30319;ASP.NET版本:4.8.4075.0

这对我来说很有效。出于兴趣,您使用的是32位还是64位DWORD?我没有使用这个。我只是恢复了一个被一些过分热心的stackoverflow版主掩盖的答案(在某个代表级别,你可以看到被删除的答案)。我将删除的答案转发给了我组织中有问题的人。仅供参考,链接的文章实际上说不要这样做。@nickwesselman第一篇文章说不要为特定产品(SCOM)这样做。第二个technet论坛链接说,与第一个不同的场景是。所以它可能仍然适用于您的特定情况。我们刚刚回收了应用程序池,问题已经解决。甚至不使用sharepoint,只是一个无聊的asp.net应用程序。SP2010上的问题由IISReset修复。对我来说,这有效果,但不能解决问题。我有两个API。当第一次接近其中一个时,它们工作。然后使用另一个API时,会引发此异常。所以他们两个都工作,但不是同时工作。iisreset为我工作。有人知道是什么导致了这个问题吗?我不得不重新启动IIS Express来解决这个问题,但不知道为什么会发生这个问题!
 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