WebService客户端设置缓冲大小问题
发布时间:2020-12-16 22:34:52 所属栏目:安全 来源:网络整理
导读:?1.问题:WebService调用其他WebService,缓冲默认大小为65536,当消息包过大时,就会出现SOAP调用失败的问题。 2.解决方案,通过修改客户端的web.config来解决,如下: ?system.serviceModel ? ? bindings ? ? ? basicHttpBinding ? ? ? ? binding name="Play
?1.问题:WebService调用其他WebService,缓冲默认大小为65536,当消息包过大时,就会出现SOAP调用失败的问题。 2.解决方案,通过修改客户端的web.config来解决,如下: ?<system.serviceModel> ? ? <bindings>? ? ? <basicHttpBinding> ? ? ? ? <binding name="PlayListServiceSoap" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize=" 2147482647" maxBufferPoolSize=" 2147482647" maxReceivedMessageSize=" 2147482647" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true"> ? ? ? ? ? <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" /> ? ? ? ? ? <security mode="None"> ? ? ? ? ? ? <transport clientCredentialType="None" proxyCredentialType="None" realm="" /> ? ? ? ? ? ? <message clientCredentialType="UserName" algorithmSuite="Default" /> ? ? ? ? ? </security> ? ? ? ? </binding> ? ? ? </basicHttpBinding> ? ? </bindings> ? ? <client> ? ? ? <endpoint address="http://192.168.11.104:203/PlayListService.asmx" binding="basicHttpBinding" bindingConfiguration="PlayListServiceSoap" contract="PlayListServiceRef.PlayListServiceSoap" name="PlayListServiceSoap" /> ? ? </client> ? </system.serviceModel> (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |