Skip to main content
Email Password   helpLost your password?

Introduction

Storing and retrieving BLOB images from a database column has been implemented since the first days of ASP in several ways. Scalability (more users using the same resources) and performance (faster execution times) are important factors in today's high demanding websites. There are 1001 ways to write code to do a predefined task (and they might all even work), yet getting it right requires paying attention to the details. With the introduction of HTTP handlers in ASP.NET, this can be done better than using a standard ASP.NET (.aspx) page; with async DB operations in ADO.NET v2 combined with async HTTP handlers, this gets even better!

Background

Using the code

The solution source code includes the following multiple demonstrations:

The only difference between the implementations is the requirement for HTTP handlers to be registered in the web.config file, which gives us more flexibility in the URL, but limits us, for example, when deploying to ISPs (since they don't always allow changes to the web.config or IIS mappings). That's why WebHandlers where created to workaround those changes - it's in fact exactly the same, without the need to register any handlers or IIS mappings (to map to our new file type, since .ASHX files are mapped by default when installing ASP.NET). Personally, I find the WebHandler implementation "cleaner" and easier to maintain, at the cost of avoiding interesting URLs.

Points of interest

History

You must Sign In to use this message board.
 
 
Per page   
 FirstPrevNext
GeneralExcellent Article Pin
vineet13780
13:10 14 Apr '08  
Generalasync=true SQL Server 2000 Pin
mikepc
3:41 9 Oct '07  
GeneralWhat would u suggest for serving wav files to embedded Media Player? Pin
durden81
3:36 15 Aug '07  
GeneralRe: What would u suggest for serving wav files to embedded Media Player? Pin
Leon Dviry Segal
9:48 15 Aug '07  
GeneralIIS Configuration Problem or Handler Pin
phanf
12:04 11 Oct '06  
Generalgood stuff - Pin
Leo Linder
10:53 14 Sep '06  
GeneralGood Work Pin
vik20
20:11 6 Sep '06  


Last Updated 5 Sep 2006 | Advertise | Privacy | Terms of Use | Copyright © CodeProject, 1999-2009