title: Web Config : 'request for configurationPermission failed' error
body: <p>I'm trying to deploy a website and I'm getting the following error : </p>
  
  <blockquote>
    <p>Request for ConfigurationPermission failed while attempting to access configuration section 'system.web/globalization'. To allow all callers to access the data for this section, set section attribute 'requirePermission' equal 'false' in the configuration file where this section is declared. ---> System.Security.SecurityException: Request for the permission of type 'System.Configuration.ConfigurationPermission, System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' failed.</p>
  </blockquote>
  
  <p>The problem is that I haven't even defined that section in my webconfig file. Therefore I tried to define it as follow :</p>
  
  <p>1) I added this code at the bottom of my webconfig file (just before the closing configuration tag)</p>
  
  <pre><code>&lt;globalization
             fileEncoding="utf-8"
             requestEncoding="utf-8"
             responseEncoding="utf-8"
             culture="fr-FR"
             uiCulture="fr-FR"
          /&gt;
  </code></pre>
  
  <p>2) I added this code in the section part of the file :</p>
  
  <pre><code>&lt;configSections&gt;
  &lt;section type="System.Web.Configuration.GlobalizationSection, System.Web.Globalization" name="globalization" requirePermission="false" /&gt;
  &lt;/configSections&gt;
  </code></pre>
  
  <p>But it's still not working. I'm on a shared hosting plan so I can't change the trust level of my application. I'm not very skilled with webconfig, I made some researchs on msdn and google to come up with this solution. But unfortunately I'm still getting the same error. Any idea ?</p>
  
  <p><strong>Update:</strong> I noticed that in many examples the PublicKeyToken, VersionNumber etc.. are written in the type attribute. I'll try to find the correct informations for the assembly I'm using. Well, I added more details about the assembly but it didn't work :</p>
  
  <pre><code>&lt;section type="System.Web.Configuration.GlobalizationSection, System.Web, Version=4.0.0.0, Culture=neutral,  PublicKeyToken=b03f5f7f11d50a3a " allowDefinition="Everywhere" name="globalization" requirePermission="false" /&gt;
  </code></pre>