all groups > sql server reporting services > february 2005 >
You're in the

sql server reporting services

group:

MHTML Streaming


MHTML Streaming MER78
2/28/2005 2:01:02 PM
sql server reporting services:
I am streaming an MHTML file to an aspx page:

Response.Clear()
Response.AddHeader("Content-Disposition", "inline; filename=MyFile.mht")
Response.AddHeader("Content-Length", MyByteArray.Length.ToString)
Response.ContentType = "multipart/related"
Response.BinaryWrite(MyByteArray)
Response.Flush()

When I load the aspx page on my computer with IE... I get "Invalid syntax
error"... when I load the same page... thru HTTP access from a co-worker's
computer... it loads fine... what am I doing wrong?

Not sure if it makes a difference... I had the address bar hidden so I didn't
notice at first... when my co-worker renders the stream the url stays the
same... for me I get mhtml: in front of the url... in addition to the
RE: MHTML Streaming MER78
4/4/2005 7:55:05 AM
I figured I should post this in case other ppl were looking for some
answers... apparently my MHTML issue has something to do with a security
patch for IE... there is however a way to get around it...

You can attach a dummy query string to your aspx page that ends with a .mht.
For example, if the page that streams down mht content is MyPage.aspx, then
you want to use this URL:
http://Path-To-File/MyPage.aspx?ignored=whatever.mht

[quoted text, click to view]
AddThis Social Bookmark Button