xamarin - WCF over WSDL Timeout error -
i develop server-client app using xamarin. use wcf send data server client. , happens timeout exceptions.
i guess problem of slow connection server. via fast wi-fi, 3g, 4g no problems. if connection speed less 3g, happens timeout.
i diagnose connection wireshark, , it's saying next when timeout (see picture
)
please, me resolve problem.
when creating binding can specify timeouts , reader quotas. must raise timeout spans appropriate value. can in code , through configuration file.
through code can this
var binding = new netnamedpipebinding() { opentimeout = timespan.maxvalue, closetimeout = timespan.maxvalue, sendtimeout = timespan.maxvalue, receivetimeout = timespan.maxvalue, readerquotas = { maxstringcontentlength = 2147483647, maxbytesperread = 2147483647, maxarraylength = 2147483647 }, maxbuffersize = 6553500, maxreceivedmessagesize = 6553500 }; and through configuration file can
<system.servicemodel> <bindings> <nettcpbinding> <binding name="longtimeoutbinding" receivetimeout="00:10:00" sendtimeout="00:10:00"> <security mode="none"/> </binding> </nettcpbinding> </bindings> <services> <service name="longtimeoutservice" behaviorconfiguration="longtimeoutbehavior"> <endpoint address="net.tcp://localhost/longtimeout/" binding="nettcpbinding" bindingconfiguration="longtimeoutbinding" /> </service> ....
Comments
Post a Comment