由于最大邮件大小配额,无法从WCF检索数据

时间:2017-03-08 17:27:29

标签: wcf

我刚刚从MVC客户端使用basicHttpbinding引用了一个WCF服务的任务,所有工作正常,直到我必须向DropDownMenu显示一个非常填充的表的信息(只是所选字段的文本和值为下拉列表有效) - 我正在谈论5000条记录。 显示dropdownmenu中的信息是项目必须的,到目前为止我确实设法显示50条记录的信息(所以imho不是MVC下拉问题)但是当它显示存储在表中的整个记录​​时得到了这条消息

enter image description here

正如我所提到的,我使用basicHttpbinding并且一切正常,直到收到错误消息,所以我在Web.config中做了一些更改,它看起来像这样:     

  <system.web>
    <compilation debug="true" targetFramework="4.0" />
  </system.web>
  <system.serviceModel>
    <behaviors>
      <serviceBehaviors>
        <behavior>
          <!-- To avoid disclosing metadata information, set the value below to false before deployment -->
          <serviceMetadata httpGetEnabled="true"/>
          <!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->
          <serviceDebug includeExceptionDetailInFaults="false"/>
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />

    <bindings>
      <basicHttpBinding>
        <binding name="basicHttp" allowCookies="true" maxBufferPoolSize="2147483647" 
          maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" >
          <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
             maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
        </binding>
      </basicHttpBinding>
    </bindings>

  </system.serviceModel>

  <system.webServer>
    <modules runAllManagedModulesForAllRequests="true"/>
    <!--
        To browse web app root directory during debugging, set the value below to true.
        Set to false before deployment to avoid disclosing web app folder information.
      -->
    <directoryBrowse enabled="true"/>
  </system.webServer>

  <connectionStrings>
    <add name="SIFP_GFC" connectionString="Dsn=sifp_desarrollo"
        providerName="System.Data.Odbc" />
  </connectionStrings>

</configuration>

但仍然遇到同样的问题,请您告诉我如何才能正确显示dropdownmenu中的数据?

1 个答案:

答案 0 :(得分:0)

您应该覆盖配置,按右键到端点(在wcf测试客户端中),选择edit config并在服务器绑定中重写配置