报告服务和Web 应用程序(带有 HTTPHandler)

发布于 2024-08-13 04:11:47 字数 1688 浏览 2 评论 0原文

我们正在尝试将 SQL Reporting Services 添加到 .Net 2.0 Web 应用程序。 SRS 已成功安装在服务器上,但当我们尝试加载报告或访问报告管理器时出现错误:

Server Error in '/Reports' 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: Could not load file or assembly 'netGmrc' or one of its dependencies. The system cannot find the file specified.

该错误来自 web.config 中的一行,其中添加了一个名为 Upload.axc 的 httpHandler到网络应用程序。下面列出了整个 httpHandler 部分。

    <httpHandlers>
        <add verb="*" path="Upload.axd" type="netGmrc.Upload, netGmrc"/>
        <remove verb="*" path="*.asmx"/>
        <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
        <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
        <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
    </httpHandlers>

当我们从 Web.Config 中删除 Upload.axd 处理程序时,SRS 中的所有内容都工作正常。让 Reporting Services 使用此 httphandler 与 Web 应用程序一起工作的正确方法是什么?

We are trying to add SQL Reporting Services to a .Net 2.0 Web Application. SRS has been installed on the server successfully, but we get an error when we try to load a report or access the report manager:

Server Error in '/Reports' 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: Could not load file or assembly 'netGmrc' or one of its dependencies. The system cannot find the file specified.

The error is being coming from a line in the web.config where an httpHandler called Upload.axc is being added to the web application. The entire httpHandler section is listed below.

    <httpHandlers>
        <add verb="*" path="Upload.axd" type="netGmrc.Upload, netGmrc"/>
        <remove verb="*" path="*.asmx"/>
        <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
        <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
        <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
    </httpHandlers>

When we remove the Upload.axd handler from Web.Config, everything in SRS works fine. What is the proper way to have Reporting Services work along side the web application with this httphandler?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

紙鸢 2024-08-20 04:11:47

我找到了一个似乎有效的解决方案,即更改应用程序的 web.config,以便 Reporting Services 不会继承这些设置。阻止继承似乎可以让 Web 应用程序和报告服务正常运行。

<location path="." inheritInChildApplications="false">
  <system.web>
    ...
  </system.web>
</location>

这来自Stack Overflow问题#1049573

I've found a solution that seems to work, which is to change the application's web.config such that the settings are not inherited by Reporting Services. Preventing the inheritance seems to allow both the Web Application and Reporting Services to function properly.

<location path="." inheritInChildApplications="false">
  <system.web>
    ...
  </system.web>
</location>

This came from Stack Overflow question #1049573.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文