Imagicle Application Suite 2016.Summer.1 and later.
On IAS server, Microsoft System Center Operations Manager 2016 Agent is installed.
The following error is shown when trying to open Application Suite Web interface:
"Loading this assembly would produce a different grant set from other instances. (Exception from HRESULT: 0x80131401)"
Moreover, in Windows Event Registry, there are the following two events in Application section:
Source: ASP.NET 4.0.30319.0
Event ID: 1309
Level: Warning
Description:
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 28-06-2018 12:29:28
Event time (UTC): 28-06-2018 10:29:28
Event ID: 5b590a7766b241d087b6e894b6181c5b
Event sequence: 1
Event occurrence: 1
Event detail code: 0
Application information:
Application domain: /LM/W3SVC/1/ROOT/fw-1-131746553661044212
Trust level: Full
Application Virtual Path: /fw
Application Path: C:\Program Files (x86)\StonevoiceAS\
Machine name: EGCLINEAFAXSV01
Process information:
Process ID: 8956
Process name: w3wp.exe
Account name: NT AUTHORITY\SYSTEM
Exception information:
Exception type: FileLoadException
Exception message: Loading this assembly would produce a different grant set from other instances. (Exception from HRESULT: 0x80131401)
at System.Linq.Enumerable.Any[TSource](IEnumerable`1 source)
at System.Web.Compilation.BuildManager.GetPreStartInitMethodsFromAssemblyCollection(IEnumerable`1 assemblies, Boolean buildingFromCache)
at System.Web.Compilation.BuildManager.GetPreStartInitMethodsFromReferencedAssemblies()
at System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath, Boolean& isRefAssemblyLoaded)
at System.Web.Compilation.BuildManager.ExecutePreAppStart()
at System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException)
Request information:
Request URL: http://localhost/fw/
Request path: /fw/
User host address: ::1
User:
Is authenticated: False
Authentication Type:
Thread account name: NT AUTHORITY\SYSTEM
Thread information:
Thread ID: 3
Thread account name: NT AUTHORITY\SYSTEM
Is impersonating: False
Stack trace: at System.Linq.Enumerable.Any[TSource](IEnumerable`1 source)
at System.Web.Compilation.BuildManager.GetPreStartInitMethodsFromAssemblyCollection(IEnumerable`1 assemblies, Boolean buildingFromCache)
at System.Web.Compilation.BuildManager.GetPreStartInitMethodsFromReferencedAssemblies()
at System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath, Boolean& isRefAssemblyLoaded)
at System.Web.Compilation.BuildManager.ExecutePreAppStart()
at System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException)
The root cause is the APM component of Microsoft System Center Operations Manager 2016 Agent.
As explained by this article from Microsoft, the issue can be fixed:
To uninstall SCOM 2016, please open Windows Control Panel and select "Programs and features". Locate the application called "Microsoft Monitoring Agent" and click "Uninstall".
Once done, please reboot the server.