I created a .ashx generic web handler that returns images. However, I wanted to return a meaningful response if there was any problem returning the requested image (for example, an invalid ID, missing file, corrupted file, etc). Since the application calling the web handler only expected an image, I needed to return the meaning response as an image. Here’s what I wrote:

I also created a small wrapper with a default font and brush:



Leave a Reply