WCF阅读大文本文件 [英] WCF reading large text File

查看:62
本文介绍了WCF阅读大文本文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个35K行的文本文件,由安全WCF服务(https)读取,响应发送回.net应用程序。



配置设置< br $> b $ b

I have a text file with 35K lines which is read by Secured WCF service(https) and response is send back to .net application.

config settings

<binding name="BasicHttpBinding_IService1" closeTimeout="00:15:00"

        openTimeout="00:15:00" receiveTimeout="00:15:00" sendTimeout="00:15:00"

        allowCookies="false" bypassProxyOnLocal="false"

        maxBufferSize="2147483647" maxBufferPoolSize="524288" maxReceivedMessageSize="2147483647"

        messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"

        useDefaultWebProxy="true">
          <readerQuotas maxDepth="64" maxStringContentLength="2147483647" maxArrayLength="2147483647"

           maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
          <security mode="Transport">
            <transport clientCredentialType="None" proxyCredentialType="None" realm=""/>
            <message clientCredentialType="Certificate" algorithmSuite="Default" />
          </security>
        </binding>
      </basicHttpBinding>
    </bindings>



有问题收集将结果返回给客户端,它的工作量为9K记录,但不止于此返回NULL。



请建议帮助设置



提前致谢


There is problem collecting the result back to client, its works for 9K records however anything more than that returns NULL.

Please suggest help to settings

Thanks in advance

推荐答案

<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
  <bindings>
    <wsHttpBinding>
      <binding openTimeout="00:10:00"
               closeTimeout="00:10:00"
               sendTimeout="00:10:00"
               receiveTimeout="00:10:00" maxReceivedMessageSize="4194304" maxBufferPoolSize="4194304">

      </binding>
    </wsHttpBinding>

    <basicHttpBinding>
      <binding
                 name="MyServiceConsumerBinding"
                 closeTimeout="00:01:00"
                 openTimeout="00:01:00"
                 receiveTimeout="00:10:00"
                 sendTimeout="00:01:00"
                 allowCookies="false"
                 bypassProxyOnLocal="false"
                 hostNameComparisonMode="StrongWildcard"
                 maxBufferSize="5000000"
                 maxBufferPoolSize="524288"
                 maxReceivedMessageSize="5000000"
                 messageEncoding="Text"
                 textEncoding="utf-8"
                 transferMode="Buffered"
                 useDefaultWebProxy="true">
        <readerQuotas
                     maxDepth="32"
                      maxStringContentLength="2147483647"
                      maxArrayLength="2147483647"
                      maxBytesPerRead="2147483647"
                      maxNameTableCharCount="2147483647" />

      </binding>
    </basicHttpBinding>

  </bindings>
</system.serviceModel>





希望这会对你有帮助



Hope this will help you


你能达到recieveTimeout门槛吗?
Could you be reaching the recieveTimeout threshold?


这篇关于WCF阅读大文本文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆