Loading this assembly would produce a different grant set from other instances

I was trying to get to the root of an issue for a client’s environment that was mysteriously down (SharePoint 2013, March 2017 CU). IIS was up and running, disk space was fine, SQL was also fine, but the sites were just loading blank pages. I checked the error logs, on both the application servers, as well as the web front ends, and they all had this same error message. "An exception occurred when trying to issue security token: Loading this assembly would produce a different grant set from other instances". This is a new one on me, I’ve not seen this error before. (Surprise, it’s SharePoint!)

Image

After a bit of searching, I found this article on TechNet, which advised in setting the trust level to full for the web.config files, clearing out ASP.NET temporary files, and a few other things. None of these solutions worked. However, in the comments of the same article, someone had noted to setting the following registry setting, adding a DWORD (32-bit) value of 1 under a new key named LoaderOptimization in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework. And also doing the same under HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework.

Rebooted the servers, although I am sure an IIS reset, and a manual restart of all of the services would have done the trick, but the Farm was down, so a reboot wasn’t an issue to perform.

I found more information on the issue from CA, on this page, under the heading "Defect DE46408 (Formerly 369408) – Application Errors When Instrumenting SharePoint", it states:

"This situation usually happens when the SharePoint site web.config is set to use the legacy CAS model. The legacy CAS model was introduced in .NET version 4, and provokes the error. Refer to https://msdn.microsoft.com/en-us/library/vstudio/dd984947(v=vs.100).aspx for a reference of CAS changes in ASP.NET 4."

I am not exactly sure what prompted this issue, except that there were some recent security updates applied, but this did the trick. I’ll have to dig into this deeper as time permits and see if I can determine the root cause.

Advertisement

"Microsoft SharePoint Foundation administration tool has stopped working" Error During Install of SharePoint 2016 SP1

An issue I have recently run into when installing SharePoint 2016 with SP1 slipstreamed is the following error:

Image(1)

At first, I thought that at the time, it was related to the binaries being on a network share for the install… however, I have also encountered the same issue when installing locally from the server (Windows Server 2012 R2 Datacenter running on VMWare).

Happens towards the end of the installation:

Image(2)

Errors that show up in the Event Log are:

Image(3)

Application: stsadm.exe

Framework Version: v4.0.30319

Description: The process was terminated due to an unhandled exception.

Exception Info: System.IO.FileNotFoundException

at Microsoft.SharePoint.StsAdmin.SPStsAdmin..cctor()

Exception Info: System.TypeInitializationException

at Microsoft.SharePoint.StsAdmin.SPStsAdmin.Main(System.String[])

 

Image(4)

Faulting application name: stsadm.exe, version: 16.0.4300.1000, time stamp: 0x561d26d9

Faulting module name: KERNELBASE.dll, version: 6.3.9600.18340, time stamp: 0x57366075

Exception code: 0xe0434352

Fault offset: 0x0000000000008a5c

Faulting process id: 0xf88

Faulting application start time: 0x01d283ab05244c8e

Faulting application path: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\BIN\stsadm.exe

Faulting module path: C:\Windows\system32\KERNELBASE.dll

Report Id: 44d175a0-ef9e-11e6-80c4-0050568466c7

Faulting package full name:

Faulting package-relative application ID:

 

This seems to happen about 4-6 times during the install process. This has happened across all servers in the farm. I have done some research into this – appeared to be a known problem with prior versions, but do not have an answer at this time.

My solution to the problem is straight forward enough, just click Close Program. I have not run into any lasting effects after doing so. Lets hope that doesn’t change 🙂

Image

%d bloggers like this: