**Bug**: Handling Streams from within ashx handlers

D

Detlef Hüttenbach

There is a bug within the Handler factory that messes up the streams loaded
from memory.
Workaround: Don't use the HandlerFactory, i.e.: ashx-handlers when you need
to print images from streams into web forms.
Define your own handlers instead.

I'd appeciate a short hint on that bug or 'feature' in the Framework
documentation if not a bug fix from side of MS and a better scanning of this
aspnet ng as is the case in other MS ng's.

Best wishes
Detlef
(who upon posting now is seeing a flood of stupid virus mails)
 
H

Hermit Dave

Well for your last statement... use a no-spam id... no one forced you to put
in your real id.... if you do... you get junk... which could be anything.

Now to get back to original point. I have had issues when i was reading a
byte array and loading it in memory stream... creating Image object and then
using Image.Save to write to the Response.OutputStream (think it has
something to do with the color depth of image etc.. not sure..)
but i could create a thumbnail of same image using GetThumbnailImage and it
would correctly write to the output stream

to get over it.. all i did was for the original image i just use
Response.BinaryWrite and just write the byte[]... if the requested image was
a thumbnail them i load it into memory stream and image and then generate a
thumbnail before using Save to Response.Output stream.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,040
Latest member
papereejit

Latest Threads

Top