I'm looking for some advice on how to best serve files, in this case images, using some form of handler.
I need to serve images that are located on a path outside the working directory of the site. I know you can use Virtual Folders, but I need to perform additional authentication and validation before the file is actually allowed to be sent to the client. I have tried outputting the file using the different write methods of the HttpContext, but I'm not seeing the performance I would like. CPU usage goes trough the roof. Fething the image to lets say a byte take 1-2 ms measured using Stopwatch, but somehow when writing to the response it takes far to long.
Also in time we will be serving a large number of files located on different devices so it really need to be something flexible and I was hoping I could use a simple handler to output the files.
Hope your guys can help
View Complete Post