简体   繁体   English

Windows Phone 8.1中的WCF服务

[英]WCF service in Windows Phone 8.1

I am calling WCF service in Windows Phone 8.1, there is one service which is returning large size of data,and that is why I am getting an exception. 我在Windows Phone 8.1中调用WCF服务,有一项服务正在返回大量数据,这就是为什么我遇到异常的原因。

"System.ServiceModel.CommunicationException".

InnerException 的InnerException

"Remote server not found"

I am really getting stuck, what to do? 我真的被卡住了,该怎么办? I also increase timeout in "web.config" 我也在“ web.config”中增加超时时间

openTimeout="00:10:00" closeTimeout="00:10:00" sendTimeout="00:10:00" receiveTimeout="00:10:00"

But not getting the result. 但没有得到结果。 If there is small number of data in result, then it is giving result. 如果结果中的数据数量少,则表明结果。 Any help would be greatly appreciated. 任何帮助将不胜感激。

It sounds like it can't find your WCF service. 听起来好像找不到您的WCF服务。 But you say for small amounts of data it does. 但是您说的是少量数据。 I would try change the MaxMessageSize properties shown here 我会尝试更改此处显示的MaxMessageSize属性

In your web.config for your wcf service add: 在您的wcf服务的web.config中添加:

<bindings>
    <basicHttpBinding>
        <binding name="basicHttp" allowCookies="true"
                 maxReceivedMessageSize="20000000" 
                 maxBufferSize="20000000"
                 maxBufferPoolSize="20000000">
            <readerQuotas maxDepth="32" 
                 maxArrayLength="200000000"
                 maxStringContentLength="200000000"/>
        </binding>
    </basicHttpBinding>
</bindings>

to the binding 绑定

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM