A service is created via the Silverlight service console program "slsvcutil"
We use this generated code and set timeouts, but the timeouts are not being obeyed. We have them set to 5 s开发者_C百科econds, but the client doesn;t time out for over a minute (default)
svc = new MyServiceClient (........);
svc.Endpoint.Binding.OpenTimeout = Settings.TimeOutServiceOpen;
svc.Endpoint.Binding.CloseTimeout = Settings.TimeOutServiceClose;
svc.Endpoint.Binding.ReceiveTimeout = Settings.TimeOutServiceRecieve;
svc.Endpoint.Binding.SendTimeout = Settings.TimeOutServiceSend;
Appears to be a bug. Bug has been submitted to Monotouch team.
Use this instead:
svc.InnerChannel.OperationTimeout = ....
This seems to work for me.
精彩评论