简体   繁体   English

将Asp.net应用程序部署到IIS服务器时出错

[英]Error while Deploying Asp.net application to IIS server

Error while deploying Asp.Net application to IIs server. 将Asp.Net应用程序部署到IIs服务器时出错。

HTTP Error 500.19 - Internal Server Error HTTP错误500.19-内部服务器错误

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". 锁定默认情况下是(overrideModeDefault =“ Deny”),或者是由一个带有overlayMode =“ Deny”或旧版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. 我是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. 解决方案是在applicationHost.config文件中进行更改。

  1. Browse to “C:\\Windows\\System32\\inetsrv\\config” (you will need administrator rights here) 浏览到“ C:\\ Windows \\ System32 \\ inetsrv \\ config”(此处需要管理员权限)

  2. Open applicationHost.config 打开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” 将overrideModeDefault属性更改为“允许”

  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/ 有关更多信息: http : //blog.thinkoriginally.com/2010/02/17/asp-net-config-error-this-configuration-section-cannot-be-used-at-this-path/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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