469,352 Members | 2,054 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,352 developers. It's quick & easy.

WCF System.Timeout

I'm new to this. I'm developing a simple WCF service with a Winforms application on my laptop (2008). It seems to run okay accepting inserts, updates and deletes and sending datasets back through the service. Then the system will hang up. Here is the beginning of the error message:

System.TimeoutException was unhandled
Message="The request channel timed out while waiting for a reply after 00:00:59.9990000. Increase the timeout value passed to the call to Request or increase the SendTimeout value on the Binding. The time allotted to this operation may have been a portion of a longer timeout."
Source="mscorlib"
StackTrace:
Server stack trace:
at System.ServiceModel.Channels.RequestChannel.Reques t(Message message, TimeSpan timeout)
at System.ServiceModel.Channels.ClientReliableChannel Binder`1.RequestClientReliableChannelBinder`1.OnRe quest(TRequestChannel channel, Message message, TimeSpan timeout, MaskingMode maskingMode) .....
I've looked in the app.config and see SendTimeout value = "00:01:00" (1 minute), and I have tried a value of 10 minutes to no avail. I'm not sure how to increase the timeout value passed to the call to Request. Could someone point me the right direction there.

In any case we are dealing small amounts of data, single record inserts, updates and deletes, returning small datasets, and so I shouldn't be bumping up against any default limits. I did increase the maxReceivedMessageSize as suggested in a video tutorial.
Also, I'm not sure the best way to trap and throw the exception.

Thanks



Oct 23 '08 #1
4 8854
I think I may have solved the problem. Before each call to the service I created a new instance of the service:

Dim proxy as new ServiceClient

and after the call I was using

proxy = nothing

I changed it to

proxy.close

and now it seems to be working.

Did I really hit on my problem? Or will I be writing back?

Thanks

"Burton Roberts" <bh*********@yahoo.comwrote in message news:uq**************@TK2MSFTNGP02.phx.gbl...
I'm new to this. I'm developing a simple WCF service with a Winforms application on my laptop (2008). It seems to run okay accepting inserts, updates and deletes and sending datasets back through the service. Then the system will hang up. Here is the beginning of the error message:

System.TimeoutException was unhandled
Message="The request channel timed out while waiting for a reply after 00:00:59.9990000. Increase the timeout value passed to the call to Request or increase the SendTimeout value on the Binding. The time allotted to this operation may have been a portion of a longer timeout."
Source="mscorlib"
StackTrace:
Server stack trace:
at System.ServiceModel.Channels.RequestChannel.Reques t(Message message, TimeSpan timeout)
at System.ServiceModel.Channels.ClientReliableChannel Binder`1.RequestClientReliableChannelBinder`1.OnRe quest(TRequestChannel channel, Message message, TimeSpan timeout, MaskingMode maskingMode) .....
I've looked in the app.config and see SendTimeout value = "00:01:00" (1 minute), and I have tried a value of 10 minutes to no avail. I'm not sure how to increase the timeout value passed to the call to Request. Could someone point me the right direction there.

In any case we are dealing small amounts of data, single record inserts, updates and deletes, returning small datasets, and so I shouldn't be bumping up against any default limits. I did increase the maxReceivedMessageSize as suggested in a video tutorial.
Also, I'm not sure the best way to trap and throw the exception.

Thanks

Oct 23 '08 #2
"Burton Roberts" <bh*********@yahoo.comwrote in message news:ep*************@TK2MSFTNGP02.phx.gbl...
I think I may have solved the problem. Before each call to the service I created a new instance of the service:

Dim proxy as new ServiceClient

and after the call I was using

proxy = nothing

I changed it to

proxy.close
proxy = Nothing does - Nothing. This is not VB6.

In fact, you may want to get into the habit of using a Using/End Using block:

Using proxy As New ServiceClient
....
End Using

At least, I think that's the correct VB.NET syntax. I'm more accustomed to C#. This should be done in almost every case where the object you're creating implements IDisposable.

--
John Saunders | MVP - Connected System Developer
Oct 24 '08 #3
Thanks, John
Being a part-timer, sometimes I don't always use the new constructs. I'll remember this one now.
Thanks again
"John Saunders" <no@dont.do.that.comwrote in message news:el**************@TK2MSFTNGP03.phx.gbl...
"Burton Roberts" <bh*********@yahoo.comwrote in message news:ep*************@TK2MSFTNGP02.phx.gbl...
I think I may have solved the problem. Before each call to the service I created a new instance of the service:

Dim proxy as new ServiceClient

and after the call I was using

proxy = nothing

I changed it to

proxy.close
proxy = Nothing does - Nothing. This is not VB6.

In fact, you may want to get into the habit of using a Using/End Using block:

Using proxy As New ServiceClient
...
End Using

At least, I think that's the correct VB.NET syntax. I'm more accustomed to C#. This should be done in almost every case where the object you're creating implements IDisposable.

--
John Saunders | MVP - Connected System Developer
Nov 5 '08 #4
"Burton Roberts" <bh*********@yahoo.comwrote in message news:uH**************@TK2MSFTNGP04.phx.gbl...
Thanks, John
Being a part-timer, sometimes I don't always use the new constructs. I'll remember this one now.
Thanks again
All due respect, but Using/End Using have been there since at least VS 2005. It's not exactly new.
--
John Saunders | MVP - Connected System Developer
Nov 7 '08 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

9 posts views Thread by Penn Markham | last post: by
reply views Thread by Andy | last post: by
2 posts views Thread by =?Utf-8?B?VmlqYXk=?= | last post: by
1 post views Thread by CARIGAR | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.