Skip to main content
Home Forums Silverlight Programming Programming with .NET - General Timeout error in WCF
3 replies. Latest Post by jmiller411 on December 4, 2008.
(0)
a_anandr...
Member
15 points
163 Posts
12-04-2008 2:53 AM |
Hi
I am calling a method in WCF from Silverlight. I was getting the below error.
The HTTP request to [URL] was aborted. This may be due to the local channel being closed while the request was still in progress. If this behavior is not desired, then update your code so that it does not close the channel while request operations are still in progress.
Then I have changed the config Settings as below
<binding name="Binding1" maxReceivedMessageSize="2147483647" maxBufferSize="2147483647" maxBufferPoolSize="2147483647" >
I have also commented the closing of the call as below.
//client.CloseAsync();
Now I am getting different error like below
The HTTP request to [URL] has exceeded the allotted timeout. The time allotted to this operation may have been a portion of a longer timeout.
What configuration settings I have to make.
Thanks
Anandraj.A.
bryant
Star
9937 points
1,629 Posts
12-04-2008 3:01 AM |
Sounds like you need to configure the timeout values. Borrowing from Jonathan's post:
OpenTimeOut: Gets or sets the interval of time provided for a connection to open before the transport raises an exception. (Inherited from Binding.) CloseTimeOut: Gets or sets the interval of time provided for a connection to close before the transport raises an exception. (Inherited from Binding.) ReceivedTimeout: Gets or sets the interval of time that a connection can remain inactive, during which no application messages are received, before it is dropped. (Inherited from Binding.) SendTimeOut : Gets or sets the interval of time provided for a write operation to complete before the transport raises an exception. (Inherited from Binding.) We suggest that you'd better set all these four to a bigger value in web.config. For example, http://msdn.microsoft.com/en-us/library/system.servicemodel.basichttpbinding.aspx
OpenTimeOut: Gets or sets the interval of time provided for a connection to open before the transport raises an exception. (Inherited from Binding.)
CloseTimeOut: Gets or sets the interval of time provided for a connection to close before the transport raises an exception. (Inherited from Binding.)
ReceivedTimeout: Gets or sets the interval of time that a connection can remain inactive, during which no application messages are received, before it is dropped. (Inherited from Binding.)
SendTimeOut : Gets or sets the interval of time provided for a write operation to complete before the transport raises an exception. (Inherited from Binding.)
We suggest that you'd better set all these four to a bigger value in web.config. For example, http://msdn.microsoft.com/en-us/library/system.servicemodel.basichttpbinding.aspx
Try changing those values and see if that fixes it.
12-04-2008 4:40 AM |
Thanks for the reply. But Still I am getting the same error. Here below is the configuration.
<
>
jmiller411
12 points
1 Posts
12-04-2008 10:09 AM |
Hi Try this: Set these properties in 2 files: 1. your web.config file in your web/wcf project 2. your ServiceReferences.ClientConfig file in your Silverlight project receiveTimeout="00:10:00" sendTimeout="00:10:00" openTimeout="00:10:00" closeTimeout="00:10:00"