473,563 Members | 2,735 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Async webrequest calls and ASPX Asynchronous PreRequestHandl er

Hi Guys

I came across this article which deals with Performance Considerations
for Making Web Service Calls from ASPX Pages:
http://msdn.microsoft.com/library/de...ce07222003.asp

The article talks about 3 approaches synchronous | asyncronous | and
PrerequestHandl er with asynchronous calls. I tried the sample that
came with the article and the concept proves right.

So I decided to try the same technique but this time instead of using
a webservice I used webrequest as my long running process. After
testing the code I realised that there was no difference in requests
per second between 'asyncronous ' and 'PrerequestHand ler with
asynchronous calls'.

QUESTIONS:
==========

WEBPAGE.ASPX
WebRequest1-->http://www.google.com.au/search?hl=en&q=test1
WebRequest2-->http://www.google.com.au/search?hl=en&q=test2
WebRequest3-->http://www.google.com.au/search?hl=en&q=test3

Wait for all requests to complete
Process results
Display results to user

1. Basically I need to know if it will work well for a scenario where
I have to make 3 async webrequests to a site to retrieve its content
so I can process and display results back to a user. The requests only
take 2 - 3 secs on their own. My main concern is how many requests per
second can I get through I have also changed the maxconnection limit
from 2 to 40 (HTTP 1.1)

2. I was just wondering if anyone has used the techniques described in
the article, or has any suggestions on the best approach for this
problem.

3. What are the potential bottlenecks that webrequests have in terms
of threadpool, blocking calls etc

Regards Dotnetshadow
Nov 19 '05 #1
0 1304

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

Similar topics

8
1989
by: Dave | last post by:
I'm using the BeginInvoke method of a delegate to invoke a thread asynchronously and then use the EndInvoke to retrieve the value. This works wonderfully until a Serviced Component is added to the mix. When the Serviced Component is invoked with BeginInvoke, the code hangs for the duration of the call rather than running async. Any ideas?...
10
2939
by: Shawn Meyer | last post by:
Hello - I am trying to write a class that has an async BeginX and EndX, plus the regular X syncronous method. Delegates seemed like the way to go, however, I still am having problems getting exactly what I want. Here are my goals 1. I would like the IAsyncResult that is returned by the Begin function to be able to be waited on or...
6
3806
by: Shak | last post by:
Hi all, Three questions really: 1) The async call to the networkstream's endread() (or even endxxx() in general) blocks. Async calls are made on the threadpool - aren't we advised not to cause these to block? 2) You can connect together a binaryreader to a networkstream:
7
2847
by: Shak | last post by:
Hi all, I'm trying to write a thread-safe async method to send a message of the form (type)(contents). My model is as follows: private void SendMessage(int type, string message) { //lets send the messagetype via async NetworkStream ns = client.GetStream(); //assume client globally accessible
7
5059
by: =?Utf-8?B?Q2FybG8gRm9saW5p?= | last post by:
Hi, I implemented asynchronous calls to a web resource (using HttpWebRequest) from asp.net 2.0. The request it's made asyncronously (I see that beginGetResponse returns immediately). The number of worker thread and completionPortThreads are over 300. Making 200 calls I see that 100 are queued. There's a counter telling how much async calls...
1
13244
by: 1388-2/HB | last post by:
I have a class file in my App_Code folder called "clsBasePage.vb" that looks like this: Public Class clsBasePage Inherits System.Web.UI.Page ...stuff... End Class It's a "page" in that it inherits from ui.page, but has no .aspx file. It's just a class file.
11
8584
by: atlaste | last post by:
Hi, In an attempt to create a full-blown webcrawler I've found myself writing a wrapper around the Socket class in an attempt to make it completely async, supporting timeouts and some scheduling mechanisms. I use a non-blocking approach for this, using the call to 'poll' to support the async mechanism - rather than the 'begin' and 'end'...
5
4669
by: =?Utf-8?B?U3RlZmFuIEZpbGlw?= | last post by:
Hello, I'm trying to launch several async calls for different methods of a web service, but I get this error when i'm trying to read the result (There was an error during asynchronous processing. Unique state object is required for multiple asynchronous simultaneous operations to be outstanding.). I read the post at...
1
2845
by: APA | last post by:
I've seen the MS sample async web request pattern and I ask is it really async if it is using a ManualResetEvent and setting WaitOne()? The ManualResetEvent object is being declared as a static variable so isn't it causing problems with other threads that may be using the same class to execute the async web request? If I remove the...
0
7659
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7580
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7882
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7634
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7945
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5208
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3634
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2079
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
916
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.