Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 101955
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T00:52:14+00:00 2026-05-11T00:52:14+00:00

My objective is to get the answer from up to 6000 Urls in the

  • 0

My objective is to get the answer from up to 6000 Urls in the shortest time. It was working very well (12 seconds for 5200 LAN Addresses) until some delay started to happen.

My code uses up to 20 simultaneous HttpWebRequest.BeginGetResponse with ThreadPool.RegisterWaitForSingleObject for timeout handling.

However some (up to 4 in 5,000) of the requests never hit the TimeoutCallback function with the second parameter (timedOut) true, and they waste 5 minutes of my precious time until they hit theBeginGetResponseCallback function and then raise a WebException. The exceptions says something like ‘the operation reached the time limit’, but as the exception message is in portuguese(my native language) I couldn’t Google it.

I wonder if I can reduce this time limit to 20 seconds for example. Anyone knows how? I’ve already tried:

<system.web>     <httpRuntime executionTimeout='20'/> </system.web> 

But as I’m running it as a Console Application, ASP.NET configurations don’t work. And I also tried:

myHttpWebRequest.Timeout = 20*1000; 

And

ThreadPool.RegisterWaitForSingleObject(result.AsyncWaitHandle, new WaitOrTimerCallback(TimeoutCallback), AsyncState, 20*1000, true); 

Without success. Can you help me?

Update What I am trying to say is there are 4 possible results for an asynchronous HTTP request:

  1. Never reach the callback function -> timeout callback function
  2. Reaches and answers successfully
  3. Reaches and raises an exception
  4. Delay exactly 5 minutes until raise an ‘time limit’ web exception inside the callback function

The 4th possibility is the one is delaying my Application, and I don’t know how to shorten that delay

Update Is there a possibility that the method GetResponseStream instead of the GetResponse is who causes the timeout?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T00:52:15+00:00Added an answer on May 11, 2026 at 12:52 am

    It sounds like you need to set the ReadWriteTimeout property of the request object.

    http://blogs.msdn.com/buckh/archive/2005/02/01/365127.aspx

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Whats the best way to get the current time (HH:MM:SS) using Objective-C. I would
I'm seeing an odd behavior with trying to get seconds since epoch in objective
I'm trying to URL encode a string to form a GET request from objective-c.
I can't seem to figure out how to get Objective-c to auto box my
I'm new to objective C and I just wanted to get a general clarification
In Objective-c/Cocoa, how do I get the icon that Finder uses for the desktop
How can I get the Timezone offset in Objective-C (for iPhone OS 3)? For
Is there a way to get the list of currently running threads in objective-C?
[sqlite executeQuery:@UPDATE UserAccess SET Answer ='Positano';]; NSArray *query2 = [sqlite executeQuery:@SELECT Answer FROM UserAccess;];
New to objective-c and I just can't find the answer to this question anywhere.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.