The SharePoint Site Page displays “500 – Internal Server Error” while accessing it after the successful SharePoint 2013 farm setup. The event viewer shows:
The Internal Server Error 500 is a collective status code for server errors. Therefore, at first glance, it is not possible to determine where the error actually lies. The user only knows that the server has reported an unexpected error. .NET.NET Core Active Directory ADFS AJAX Amministrazione Angular Angular JS Apple Apple MAC ASP ASP.NET Azure Batch (.BAT) Bootstrap Browser C# Calcolatori CAML Claims Client Object Model Clipper Codeplex CRM CSOM CSS Database DOS Download Elettronica Elettrotecnica Emulatori Entity framework Errori Esami Esempi Excel Fai da te Finanze Flash.
“.NET Runtime version 4.0.30319.18408 – The profiler was loaded successfully. Profiler CLSID: ‘AppDynamics.AgentProfiler’. Process ID (decimal): 13688. Message ID: [0x2507].”
From SharePoints Claims Authentication:
“An exception occurred when trying to issue security token: Loading this assembly would produce a different grant set from other instances. (Exception from HRESULT: 0x80131401).”
By default SP2013 uses the legacy code access security model which is less configurable than the latest 4.0 model. Normally, .NET runtime security system walks the call stack to determine the code is authorized to access a resource or perform an operation, comparing the granted permissions of each caller to the permission being demanded. If any caller in the call stack does not have the demanded permission, a security exception is thrown and access refused.
The Remote Server Returned An Error (500) Internal Server Error. Sharepoint Online
Below is the small illustration of Security stack walk: (Courtesy: MSDN article on Code Access Security)
500 Internal Server Error Sharepoint Online Access
As you’ve noticed in the Event Viewer, .NET Runtime throws that the profiler isn’t compatible with the legacy model. To resolve the issue, please update your web application or problematic web app’s web.config by setting legacyCasModel attribute to false as shown in below.
500 Internal Server Error Fix
<trust level=”Full” originUrl=”” legacyCasModel=”false” />