views:

731

answers:

1

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;
+4  A: 
 client.InnerChannel.OperationTimeout = new TimeSpan(0, 1, 0);
sipwiz