I am reading from a .NET 2.0 web service using Silverlight 2.0. The web service requests time out after 30 seconds, which is OK for most queries but occasionally I get a timeout. How do I extend the timeout to one minute?
I tried this but it makes no difference.
SilverSearchSoapClient client = new SilverSearchSoapClient();
client.Endpoint.Address = new EndpointAddress(App.ServiceEndpointUrl);
client.Endpoint.Binding.OpenTimeout = new TimeSpan(0, 1, 0);
client.Endpoint.Binding.SendTimeout = new TimeSpan(0, 1, 0);
client.Endpoint.Binding.ReceiveTimeout = new TimeSpan(0, 1, 0);
return client;
client.InnerChannel.OperationTimeout = new TimeSpan(0, 1, 0);
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.