【问题标题】:Configuration for downloading large DIME attachments via C# DLL from JasperServer web service通过 C# DLL 从 JasperServer Web 服务下载大型 DIME 附件的配置
【发布时间】:2011-01-10 20:19:20
【问题描述】:

我正在构建一个 MVC2 .Net Web 应用程序来下载和查看存储在 Jasperserver 上的报告。我已经构建了一个 Web 服务客户端库来访问 Jasperserver Web 服务。 Jasper 使用 DIME 附件,所以我使用的是 Microsoft.Web.Services2。

我的 MVC2 应用程序适用于较小的报告,但是当我尝试在 html (~9mb) 中拉下一个 90 页的报告时,我遇到了这个错误:

WSE352: The size of the record exceed its limit.

here 帖子显示了我的客户端应用的 app.config 设置的以下内容:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <configSections>
        <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
           <section name="microsoft.web.services2" type="Microsoft.Web.Services2.Configuration.WebSer vicesConfiguration, Microsoft.Web.Services2, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
        </sectionGroup>
    </configSections>
    <applicationSettings>
        ...
    </applicationSettings>
  <microsoft.web.services2>
    <messaging>
      <maxRequestLength>-1</maxRequestLength>
    </messaging>
  </microsoft.web.services2>
</configuration>

进行这些更改后,我仍然遇到相同的错误“WSE352”。我的问题是我的库的上述 app.config 更改是否足以让我的 MVC 应用程序下载大型报告?还是我需要更改我的 MVC 应用的 web.config?

任何帮助将不胜感激!

【问题讨论】:

    标签: web-services asp.net-mvc-2 download jasperserver


    【解决方案1】:

    是的,您确实需要在 MVC 应用的 web.config 中添加配置!

    在重新阅读链接的帖子并进行一些实验后,我遇到的问题大多与复制/粘贴相关。

    这是我的库中 app.config 的相关部分:

    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>
        <configSections>        
            <section name="microsoft.web.services2" type="Microsoft.Web.Services2.Configuration.WebServicesConfiguration, Microsoft.Web.Services2, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
        </configSections>
      <microsoft.web.services2>
        <messaging>
          <maxRequestLength>-1</maxRequestLength>
        </messaging>
      </microsoft.web.services2>
    </configuration>
    

    以及MVC应用的web.config相关部分:

    <?xml version="1.0"?>
    <configuration>
          <configSections>
            <section name="microsoft.web.services2" type="Microsoft.Web.Services2.Configuration.WebServicesConfiguration, Microsoft.Web.Services2, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
          </configSections>
    
          <microsoft.web.services2>
            <messaging>
              <maxRequestLength>-1</maxRequestLength>
            </messaging>
          </microsoft.web.services2>
        </configuration>
    

    【讨论】:

    • 这真的让我失望了,谢谢!这是我缺少的 configSections,程序集版本必须与您使用的匹配。
    • @AresAvatar 很高兴有人发现这很有用!
    猜你喜欢
    • 1970-01-01
    • 2019-01-07
    • 1970-01-01
    • 2011-08-24
    • 1970-01-01
    • 1970-01-01
    • 2013-12-04
    • 1970-01-01
    • 2022-09-25
    相关资源
    最近更新 更多