本文转自:
After creating proxy object do this :
client.InnerChannel.OperationTimeout = new TimeSpan(0,10,0);
--------------------------------------------
Please find the code below: ReportPortClient client = new ReportPortClient("Report"); client.Endpoint.Binding.OpenTimeout = new TimeSpan(0, 6, 0); client.Endpoint.Binding.CloseTimeout = new TimeSpan(0, 6, 0); client.Endpoint.Binding.SendTimeout = new TimeSpan(0, 6, 0); client.Endpoint.Binding.ReceiveTimeout = new TimeSpan(0, 6, 0); client.ClientCredentials.UserName.UserName =strUserName; client.ClientCredentials.UserName.Password = strPassword; client.Endpoint.Address = new System.ServiceModel.EndpointAddress(strURL);