I have had this exception on SharePoint 2013 pages on several servers after they are running a for one or two days:
“An error occurred during the compilation of the requested file, or one of its dependencies.”
In the Windows Event Log -> Application I found this error:
There are two possible reasons (maybe there are more 😉 ):
- There was .NET Framework 4.6.x installed but was removed in order to “fix” the SharePoint 2013 setup failure message.
In this case you need to re-install .NET Framework 4.6.x after SharePoint 2013 setup. SharePoint 2013 is fully supported with 4.6.x!
- If the server is under heavy load and there are lots of processes startet in the Windows OS, then the “Desktop Heap” could be out of memory.
In this case you need to increase the Desktop Heap size of the “Inactive Windows Desktop”.
- Open the Windows registry and navigate to HKLM\System\CurrentControlSet\Control\SessionManager\SubSystems
- Open Property “Windows”
- Copy the complete content …
- … into Notepad
- Change the 3rd value of the “SharedSection” part to 20480.
- Copy the whole string back into the registry property “Windows”
- Reboot your server
This will increase the Dektop Heap to 20MB for the inactive desktops.