If you’re having issues accessing your SharePoint 2010 Central Admin pages, but SharePoint just gives you the infamous “Unexpected Error” message, this might help.
First thing you want to do is check the Windows Event Log for errors in the w3wp.exe process. If you see the following error:
06/16/2010 09:30:31.53 w3wp.exe (0x1468) 0x0534 SharePoint Foundation Runtime Unexpected System.Security.Policy.PolicyException: Required permissions cannot be acquired. at System.Security.SecurityManager.ResolvePolicy(Evidence evidence, PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset, PermissionSet& denied, Boolean checkExecutionPermission) at System.Security.SecurityManager.ResolvePolicy(Evidence evidence, PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset, PermissionSet& denied, Int32& securitySpecialFlags, Boolean checkExecutionPermission) b4efe4b0-ba91-4f03-a888-a952b8372fb4
The error reflected here indicates that the executing process was unable to get the proper execution permissions from the CLR i.e. trust levels aren’t where they need to be. Time to dig into the web.config for the Central Admin site.
Look for the “trust level” node in web. Odds are it’s set to “WSS_Minimal”. You’d want to change that node to be:<trust level=”Full” originUrl=”” /> Then simply give IIS a quick kick and retry access to Central Admin. All should be well now… IMPORTANT NOTE: USING FULL TRUST AS IN THIS CASE, IS NOT RECOMMENDED AND IS NOT A BEST PRACTICE! THIS IS SIMPLY A QUICK FIX. For best practices on implementing Code Access Security in SharePoint, please see this awesome article my friend Andrew Connell wrote.
Trackback from your site.