How do I – Restore access to SharePoint 2010 Central Admin pages when I get Unexpected Error Occurred

Written by Cornelius J. van Dyk on . Posted in Blog

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.

Cheers
C




image

Tags: , ,

Trackback from your site.

Cornelius J. van Dyk

Born and raised in South Africa during the 70's I got my start in computers when a game on my Sinclair ZX Spectrum crashed, revealing it's BASIC source code. The ZX had a whopping 48K of memory which was considered to be a lot in the Commodore Vic20 era, but more importantly, it had BASIC built into the soft touch keyboard. Teaching myself to program, I coded my first commercial program at age 15.

After graduating high school at 17, I joined the South African Air Force, graduating the Academy and becoming a Pilot with the rank of First Lieutenant by age 20. After serving my country for six years, I made my way back into computer software.

Continuing my education, I graduated Suma Cum Laude from the Computer Training Institute before joining First National Bank where my work won the Smithsonian Award for Technological Innovation in the field of Banking and Insurance. Soon I met Will Coleman from Amdahl SA, who introduced me to a little known programming language named Huron/ObjectStar. As fate would have it, this unknown language and Y2K brought me to the USA in 1998.

I got involved with SharePoint after playing around with the Beta for SharePoint Portal Server 2003. Leaving my career at Rexnord to become a consultant in 2004, I was first awarded the Microsoft Most Valuable Professional Award for SharePoint in 2005, becoming only the 9th MVP for WSS at the time. I fulfilled a life long dream by pledging allegiance to the Flag as a US citizen in 2006. I met the love of my life and became a private consultant in 2008. I was honored to receive my ninth MVP award for SharePoint Server in 2013.

Leave a comment

You must be logged in to post a comment.