2

我正在构建一个 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.

这里的帖子显示了我的客户端应用程序的 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 进行更改?

任何帮助将不胜感激!

4

1 回答 1

2

是的,您确实需要将配置添加到您的 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>
于 2011-01-14T01:45:23.933 回答