c# - WCF Timeout Issue in iOS -


i using c# ios application have been developing. have problem timeout.

i followed @ following link http://developer.xamarin.com/guides/cross-platform/application_fundamentals/web_services/

so client helper

public class clienthelper {     // dm service address     private static readonly endpointaddress endpoint = new endpointaddress("https://xxxxxxx/aaaaa/bbbbb.svc/basic");      public static dmserviceclient createclient ()     {         var binding = createbasichttp();          return    new dmserviceclient(binding, endpoint);     }       private static basichttpbinding createbasichttp()     {         var binding = new basichttpbinding()         {             name = "bshttpbinding",             maxreceivedmessagesize = 2147483647,             maxbuffersize = 2147483647           };          binding.readerquotas = new system.xml.xmldictionaryreaderquotas()         {             maxarraylength = 2147483646,             maxstringcontentlength = 524288045          };          var timeout = new timespan(0, 0, 2);         binding.sendtimeout = timeout;         binding.opentimeout = timeout;         binding.receivetimeout = timeout;         binding.closetimeout = timeout;          binding.security.mode = basichttpsecuritymode.transport;         return binding;     } } 

process can take more 10 seconds , set timeout 2 seconds not occured exception.

we tried in desktop app , set in appconfig file, works. in ios app, there not appconfig file give timeout manualy that.

i found answer.. interesting, there no information it..

   service.innerchannel.operationtimeout = timespan.fromseconds(30.0);  

so solved problem.. https://stackoverflow.com/a/10108281/1022138


Comments

Popular posts from this blog

c++ - No viable overloaded operator for references a map -

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - Cannot secure connection using TLS -