0

I have developped a website and it works in local but i got an error when i put it online.

The error is :

 Server Error in '/' Application.

Configuration Error 
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. 

Parser Error Message: This configuration section cannot be used at this path.  This happens when the site administrator has locked access to this section using <location allowOverride="false"> from an inherited configuration file.

Source Error:     
An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

And my web.config file is :

<configuration>
  <configSections>
    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
  </configSections>
  <connectionStrings>
    <add name="MyEntities" connectionString="metadata=res://*/MyModel.csdl|res://*/MyModel.ssdl|res://*/MyModel.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=XXXXX;initial catalog=XXXXX;User Id=XXXXX;Password=XXXXXXX;Integrated Security=false;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient"/>
  </connectionStrings>
    <system.web> 
    <securityPolicy>
        <trustLevel name="Full" policyFile="internal"/>
    </securityPolicy>
    <customErrors mode="Off" />
    <compilation debug="false" defaultLanguage="c#" targetFramework="4.5.2"/>
    <httpRuntime targetFramework="4.5.2"/>
  </system.web>
  <system.webServer>  
    <security>
   <authorization>
    <add accessType="Allow" users="*" />
  </authorization>
  </security>
    <modules>
      <remove name="FormsAuthentication"/>
    </modules>
  </system.webServer>
</configuration>

Does anyone can help, i really don't understand this error, Thx

Jon
  • 1
  • Presumably this is a hosted server? It looks like you're trying to set the `securityPolicy` but "the site administrator has locked access to this section" so you can't. – stuartd Sep 08 '16 at 17:04
  • It seems, like web-server where you want to deploy your application isn't configured correctly. Where are you deploying? Do you have access to administrative tools ? If you have such possibility, check IIS settings. Go to Programs and Features -> Turn windows features on or off -> Internet Information Services and check everything in "Application development features", "Common http features" and "Perfomance features". If you are using some commercial hosting - better contact administration and ask about configuration policies. – n.prokhorov Sep 08 '16 at 17:11

0 Answers0