首页 文章

IIS 10和Visual Studio 2017中的HTTP错误500.19

提问于
浏览
7

我知道有类似的问题已被问到,但他们的答案并没有解决我的问题 .

HTTP错误500.19 - 内部服务器错误无法访问请求的页面,因为页面的相关配置数据无效 . 详细错误信息:模块IIS Web核心通知BeginRequest处理程序尚未确定错误代码0x80070021配置错误此配置部分不能在此路径中使用 . 当该部分被锁定在父级别时会发生这种情况 . 锁定是默认情况下(overrideModeDefault =“Deny”),或由locationMode =“Deny”或遗留allowOverride =“false”的位置标记显式设置 . 配置文件\?\ C:\ mySite \ web.config请求的URL http:// localhost:80 / mySite / login物理路径C:\ mySite \ login登录方法尚未确定登录用户尚未确定配置来源:65:< / staticContent> 66:<handlers> 67:

<add name="ReportViewerWebControlHandler"
    > preCondition="integratedMode" verb="*"
    > path="Reserved.ReportViewerWebControl.axd"
    > type="Microsoft.Reporting.WebForms.HttpHandler,
    > Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral,
    > PublicKeyToken=b03f5f7f11d50a3a" />

我也检查了Windows功能,看起来没问题 .

我试图将 overrideModelDefault 设置为 Allow 并从applicationhost.congif中删除 WebServiceHandlerFactory 但没有结果 .

我正在使用Visual Studio 2017和IIS 10 .

任何其他想法如何解决这个问题?

4 回答

  • 4
    • 按Win键R打开运行窗口
      在运行窗口中输入

    • ,输入"OptionalFeatures.exe"

    • 在功能窗口中,单击:"Internet Information Services"

    • 点击:"World Wide Web Services"

    • 点击:"Application Development Features"

    • 检查功能 .

    我正在使用Windows 10注意“您必须以管理员身份登录才能打开或关闭Windows功能 . ”如果Windows功能为空或空白,请仔细检查以确保已启用Windows模块安装程序服务并将其设置为“自动” .

  • 0

    web.config文件没问题 .

    After installation windows, 
    IIS does not know how to support .NET Core 2.0 website (or Core 1.0 also) by default
    

    您必须在主机系统上安装.NET Core Windows Server Hosting bundle .

  • 8

    对我来说,问题是 web.config 中的重定向规则 .

    删除后,它可以工作:

    <system.webServer>
    ...
    ...
    <rewrite>
          <rules>
            <rule name="http to https" enabled="true" stopProcessing="true">
              <match url="(.*)"/>
              <conditions>
                <add input="{HTTPS}" pattern="^OFF$"/>
              </conditions>
              <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="Permanent" appendQueryString="true"/>
            </rule>
          </rules>
        </rewrite>
     </system.webServer>
    
  • 2

    我遇到了这个问题 . 对于我在包含entityframework部分的configSections之后放置连接字符串,解决了问题 .

相关问题