简体   繁体   中英

Error while Deploying Asp.net application to IIS server

Error while deploying Asp.Net application to IIs server.

HTTP Error 500.19 - Internal Server Error

This configuration section cannot be used at this path. This happens when the section is locked at a parent level. Locking is either by default (overrideModeDefault="Deny"), or set explicitly by a location tag with overrideMode="Deny" or the legacy allowOverride="false".

<authentication mode="Forms">
  <forms loginUrl="~/Account/Login.aspx" timeout="2880" />
</authentication>

<membership>
  <providers>
    <clear/>
    <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices"
         enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false"
         maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10"
         applicationName="/" />
  </providers>
</membership>

<profile>
  <providers>
    <clear/>
    <add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/"/>
  </providers>
</profile>

<roleManager enabled="false">
  <providers>
    <clear/>
    <add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="ApplicationServices" applicationName="/" />
    <add name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" applicationName="/" />
  </providers>
</roleManager>

I am new to ASP.Net. Help me how to solve this problem. Thank you in advance.

The solution was to make a change in the applicationHost.config file.

  1. Browse to “C:\\Windows\\System32\\inetsrv\\config” (you will need administrator rights here)

  2. Open applicationHost.config

  3. Find the section that showed up in the “config source” part of the error message page. For me this has typically been “modules” or “handlers”

  4. Change the overrideModeDefault attribute to be “Allow”

  5. So the whole line now looks like:

After saving the file, the page loaded up fine in my browser.

For more info: http://blog.thinkoriginally.com/2010/02/17/asp-net-config-error-this-configuration-section-cannot-be-used-at-this-path/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM