473,399 Members | 2,278 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

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 9124
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Penn Markham | last post by:
Hello all, I am writing a script where I need to use the system() function to call htpasswd. I can do this just fine on the command line...works great (see attached file, test.php). When my...
12
by: hykim | last post by:
Hello, everyone. according to MSDN, there is any constructor of System.DirectoryServices.SearchResultCollection Class. if I implement DirectorySearcher.FindAll() method by myself, then how can I...
2
by: Chris Langston | last post by:
I have a Web Server running IIS 5 or 6 on Windows 2K and Windows 2003 Server that is experiencing strange shutdown problems. We are using ASP.NET v1.1 and our application is written in VB.NET ...
0
by: Andy | last post by:
I have an .aspx application that is running on an N-Tier platform. I keep getting the following error: "System.Exception: Timeout expired. The timeout period elapsed prior to completion of the...
0
by: Ersin Gençtürk | last post by:
we are getting : System.Web.HttpUnhandledException: Exception of type System.Web.HttpUnhandledException was thrown. ---> System.Data.SqlClient.SqlException: Timeout expired. The timeout period...
1
by: Eric Sheu | last post by:
Greetings, I have been searching the web like mad for a solution to my SMTP problem. I am using Windows Server 2003 and ASP.NET 2.0 w/ C# to send out e-mails from a web site I have created to...
4
by: arun.hallan | last post by:
I know this has been asked umpteen times but i cant find an answer to my problem. Very simply, i have a GUI which is trying to call a webservice. The webservice may take any time from 5mins to...
7
by: RobKinney1 | last post by:
Hello, Wow...I have one for you all and hopefully I am not understanding this timer object correctly. I have a timer setup that pulses a connection through a socket every 60 seconds. But it...
2
by: =?Utf-8?B?VmlqYXk=?= | last post by:
Hi, I am calling an external web service that returns some data which is being displayed on my ASP.NET page. This page refreshes every 60 seconds and pulls the updated data from the web service....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.