Skip to main content

Microsoft Silverlight

Answered Question Timeout error in WCFRSS Feed

(0)

a_anandraj@hotmail.com
a_anandr...

Member

Member

15 points

163 Posts

Timeout error in WCF

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
bryant

Star

Star

9937 points

1,629 Posts

Silverlight MVP

Re: Timeout error in WCF

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

Try changing those values and see if that fixes it.

-- bryant

Blog | Twitter
_________________
Dont forget to click "Mark as Answer" on the post that helped you.

a_anandraj@hotmail.com
a_anandr...

Member

Member

15 points

163 Posts

Re: Timeout error in WCF

Hi

Thanks for the reply. But Still I am getting the same error. Here below is the configuration.

<binding name="Binding1"

maxReceivedMessageSize="2147483647" maxBufferSize="2147483647" maxBufferPoolSize="2147483647"

receiveTimeout="00:10:00" sendTimeout="00:10:00" openTimeout="00:10:00" closeTimeout="00:10:00"

>

Thanks

Anandraj.A.

jmiller411
jmiller411

Member

Member

12 points

1 Posts

Answered Question

Re: Timeout error in WCF

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"

  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities