Asynchronous web requests

It is fairly uncommon for a website to load other web pages using code on the server-side, so an example of this is not included here. As an alternative to reading web pages for each request, you could improve performance dramatically by caching the pages (refer to Chapter 5, Caching), or by having a separate program to read the pages periodically and store them in the database.

If you still want to load other web pages while processing a request, you'll find a good example at http://msdn.microsoft.com/en-us/library/system.net.webrequest.begingetresponse.aspx.

We've now seen how to change your code to use the existing threads more efficiently. You can also make configuration changes to modify the maximum number of threads. ...

Get ASP.NET Site Performance Secrets now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.