Link to home
Start Free TrialLog in
Avatar of JElster
JElsterFlag for United States of America

asked on

ASP.Net write PDF to browser shows garbage in IE

Hi.. I have the following code that writes and shows a PDF file in a brower.
Works great in Chrome.. In IE I get a bunch of garbage characters.

Like this

%PDF-1.6 %ÓôÌá 1 0 obj..........

Any ideas
thx


                Response.Clear();
                Response.ContentType = res.MimeType;

                Response.Cache.SetCacheability(HttpCacheability.Private);
                Response.Expires = -1;
                Response.Buffer = false;

                this.Response.BinaryWrite(res.DocumentBytes);
                this.Response.End();
ASKER CERTIFIED SOLUTION
Avatar of XGIS
XGIS
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial