Response.OutputStream.Write(ObjectByteArray, 0, ObjectByteArrayLength);

Last post 04-09-2008 12:28 PM by benny12345. 1 replies.

Sort Posts:

  • Response.OutputStream.Write(ObjectByteArray, 0, ObjectByteArrayLength);

    04-08-2008, 1:03 PM
    • Loading...
    • benny12345
    • Joined on 08-30-2005, 7:18 PM
    • Kansas City
    • Posts 149

     I'm trying to stream content back to the bowser and it works well in IE.  If it's an image it displays if it's a zip file it prompts for a download so on and so forth, but with firefox it just displays what looks like the unicode to the browser.

     

    I have checked to see if the correct content type is being pushed to the browser and it is.

     Is there something special I need to do for firefox in order to get this to work.

     

    Response.OutputStream.Write(ObjectByteArray, 0, ObjectByteArrayLength); 


     Thanks

    Ben
  • Re: Response.OutputStream.Write(ObjectByteArray, 0, ObjectByteArrayLength);

    04-09-2008, 12:28 PM
    Answer
    • Loading...
    • benny12345
    • Joined on 08-30-2005, 7:18 PM
    • Kansas City
    • Posts 149

     With firefox you need to specify the content type.  I was not. IE for some reason was still cool with me not specifing it.  Kinda good to know.

    Response.ContentType = response.Headers["Content-Type"].ToString();

     

    The tamper data plug-in for firefox helped me prove to myself that I was not pushing back the correct content-type in the Response. I highly recommend it.

     
    https://addons.mozilla.org/en-US/firefox/addon/966


     

    Ben
Page 1 of 1 (2 items)
Microsoft Communities
Page view counter