简体   繁体   English

IIS 10 中的报告查看器配置错误

[英]Report Viewer Configuration Error in IIS 10

I have my report viewer working perfectly on windows server 2012 (IIS 7) but when i moved the site to window server 2019 (IIS 10) it start showing the web.config error about config error.我的报告查看器在 windows 服务器 2012(IIS 7)上完美运行,但是当我将站点移动到 window 服务器 2019(IIS 10)时,它开始显示 Z2567A5EC9705EB7AC2C98Z.config 错误 aboutconfig0 I went through related question here but most talk about IIS 7 and later solutions which seems not working despite trying solution here and the error message and my config are the same.我在这里解决了相关问题,但大多数人谈论的是 IIS 7 及更高版本的解决方案,尽管在这里尝试了解决方案并且错误消息和我的配置相同,但这些解决方案似乎不起作用。 error below下面的错误

Report Viewer Configuration Error The Report Viewer Web Control HTTP Handler has not been registered in the application's web.config file.报告查看器配置错误 报告查看器 Web 控件 HTTP 处理程序尚未在应用程序的 web.config 文件中注册。 Add to the system.web/httpHandlers section of the web.config file, or add to the system.webServer/handlers section for Internet Information Services 7 or later.添加到 web.config 文件的 system.web/httpHandlers 部分,或添加到 Internet Information Services 7 或更高版本的 system.webServer/handlers 部分。

add below code to <system.web> section:将以下代码添加到 <system.web> 部分:

 <httpHandlers>
  <!-- Add this line -->
  <add verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</httpHandlers>

and this one under "system.webServer" section:这个在“system.webServer”部分下:

  <handlers>
    <!-- Add these lines -->
    <add name="ReportViewerWebControlHandler" preCondition="integratedMode" verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
    <validation validateIntegratedModeConfiguration="false"/>
</handlers>

if still not work try to change the app pool from Integrated to Classic.如果仍然无法正常工作,请尝试将应用程序池从集成更改为经典。

Found my problem.发现了我的问题。 In my case I was using an external provider;就我而言,我使用的是外部提供商; but the same issue may occur for those running IIS under their own control.但同样的问题可能发生在那些在自己的控制下运行 IIS 的人身上。 WebHosting Providers may not allow applications to modify all IIS Settings. WebHosting 提供商可能不允许应用程序修改所有 IIS 设置。 So the web.config items to register axd were being ignored.因此,注册 axd 的 web.config 项目被忽略。 In my case - from the WebHosting Support team就我而言 - 来自 WebHosting 支持团队

No, it's saying that ModSecurity has flagged calls to those file extensions as a security risk.不,这是说 ModSecurity 已将对这些文件扩展名的调用标记为安全风险。 You can add the rule ID (920440) to the list titled “Security rule IDs” under the “Switch off security rules” heading in the Web Application Firewall settings.您可以将规则 ID (920440) 添加到 Web 应用程序防火墙设置中“关闭安全规则”标题下标题为“安全规则 ID”的列表中。 This will stop this rule from triggering on this site这将阻止此规则在此站点上触发

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

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