title: SharePoint - An unexpected error has occurred
body: <p>In SharePoint I am getting the following when I go to my new web part page:</p>
  
  <blockquote>
    <p>Error</p>
    
    <p>An unexpected error has occurred.</p>
    
    <p>Web Parts Maintenance Page: If you have permission, you can use this page to temporarily close Web Parts or remove personal settings. For more information, contact your site administrator. 
    Troubleshoot issues with Windows SharePoint Services. </p>
  </blockquote>
  
  <p>I have tried the following to get a more useful error message:</p>
  
  <p>In web.config I have:</p>
  
  <pre><code>&lt;SafeMode MaxControls="200" CallStack="true" DirectFileDependencies="10" TotalFileDependencies="50" AllowPageLevelTrace="true"&gt;
  </code></pre>
  
  <p>and</p>
  
  <pre><code>&lt;customErrors mode=“Off“/&gt;
  </code></pre>
  
  <p>I have added the following to my web.config in my layout folder</p>
  
  <pre><code>&lt;SharePoint&gt;
      &lt;SafeMode MaxControls="200" CallStack="true" DirectFileDependencies="10" TotalFileDependencies="50" AllowPageLevelTrace="false" /&gt;
  &lt;/SharePoint&gt;
  </code></pre>
  
  <p>What else can I do see a stack trace?</p>