473,398 Members | 2,380 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,398 software developers and data experts.

Timeout call back in asynchronous web request.

Hi all,
I am processing asynchronous web request with setting timeout using
RegisterWaitForSingleObject.

On beginwebrequest i am sending address of one callback which i want to
execute when asynchronous web request complete.

My doubt is if timeout error occured while processing asynchronous
webrquest, will call back i set on beginwebreqest gets executed or not.

Please correct me if i am wrong.

thanks in advance.

Sep 18 '06 #1
2 4093
"archana" <tr**************@yahoo.comwrote in message
I am processing asynchronous web request with setting timeout using
RegisterWaitForSingleObject.

On beginwebrequest i am sending address of one callback which i want to
execute when asynchronous web request complete.

My doubt is if timeout error occured while processing asynchronous
webrquest, will call back i set on beginwebreqest gets executed or not.
I'm not familure with BeginWebRequest, but the general Async pattern is
pretty much the same.

If you get an error, the flow is likley to be:
- You callback will fire
- You'll call EndWebRequest(ar)
- When you call EndWEbRequest, you'll get your TimeoutException

This is how almost all of the Async stuff in .Net works...

--
Chris Mullins, MCSD.NET, MCPD:Enterprise
http://www.coversant.net/blogs/cmullins
Sep 18 '06 #2
Hi,

thanks for your reply.

Ideally whatever callback i specified in BeginGetResponse, that should
get called if timeout occured.

This is not happening in my case.

I have created log file in which i am writing data when timeout
callback fired and when callback specified in BeginGetResponse gets
fired.

When timeout callback fired entry gets added into log file but it is
not firing callback which i specified in BeginGetResponse.

Can you tell me why this is happneing. Or am i executing more
asychronos callback. Means is there any limit on number of asynchronous
callback to be executed.

Please correct me if i am wrong.

Thanks in advance.

Chris Mullins wrote:
"archana" <tr**************@yahoo.comwrote in message
I am processing asynchronous web request with setting timeout using
RegisterWaitForSingleObject.

On beginwebrequest i am sending address of one callback which i want to
execute when asynchronous web request complete.

My doubt is if timeout error occured while processing asynchronous
webrquest, will call back i set on beginwebreqest gets executed or not.

I'm not familure with BeginWebRequest, but the general Async pattern is
pretty much the same.

If you get an error, the flow is likley to be:
- You callback will fire
- You'll call EndWebRequest(ar)
- When you call EndWEbRequest, you'll get your TimeoutException

This is how almost all of the Async stuff in .Net works...

--
Chris Mullins, MCSD.NET, MCPD:Enterprise
http://www.coversant.net/blogs/cmullins
Sep 19 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: news.microsoft.com | last post by:
Hello I try to implement "retry" if connection to web ends with "time out". I want to give a chance to prolong waiting for response. The following code is taken from WebRequest.GetResponse()...
2
by: JMax | last post by:
Hello! I have a question that I really can’t think of an answer for, but thought I might as well give a shot here. I have a web service, created by the VS web service creator. I have another...
10
by: greenb | last post by:
Our asp.net web app uses a .NET component (DLL) in the bin directory to call several stored procedures back to back to perform updates. They don't return any data. Sometimes the total execution...
2
by: Chakravarti Mukesh | last post by:
Hi all, I have put some queries on the page that takes too much time to execute. Thus at the time of peak load it gives the following error. Server Error in '/ge' Application....
12
by: Jens Jensen | last post by:
I try to set the timeout property on my HttpWebRequest object before lunching the request. It seems like any value above 100 seconds is discarded. Has anyone observered malfunctional with this...
0
by: Morgan Cheng | last post by:
In the doc http://msdn2.microsoft.com/en-us/library/system.net.httpwebrequest.timeout.aspx, it reads, "A Domain Name System (DNS) query may take up to 15 seconds to return or time out. If your...
4
by: =?Utf-8?B?R2Vvcmdl?= | last post by:
Hello everyone, I am wondering if I am using TCPClient class in C#, how to setup timeout value? Timeout I mean, when connects to server for the 1st time, and during <timeoutinterval, if no...
4
by: Burton Roberts | last post by:
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...
7
by: Microsoft Newsserver | last post by:
Hi Folks. I have an issue I need some help with if thats OK. I am running Framework 2.0 using Windows Integrated Security. For most of the application we manage session timeouts without the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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.