PDFsharp & MigraDoc Foundation
https://forum.pdfsharp.net/

Memorystream - End before Close
https://forum.pdfsharp.net/viewtopic.php?f=2&t=1162
Page 1 of 1

Author:  olf [ Fri Apr 30, 2010 12:05 pm ]
Post subject:  Memorystream - End before Close

Hi,

I am quite new at Migradoc and I have now been working on a problem for quite some time. My problem is now solved - but I would like to share the solution to other MigraDoc users.

My problem was that on my test-server, every pdf-file I was streaming worked perfectly. On the production server it did not work! Chrome/Firefox gave a message like "The file is corrupted and could not be repaired". IE just gave a blank page.

I searched this forum and everytime I found anything about streaming, the solution was something like:

...
Response.Close();
Response.End();

Suddenly in a thread someone wrote
...
Response.End();
Response.Close();

(as you see - End() before Close() ).

Voila - this removed all of my pdf-problems! Suddenly all my pdf-files would show up perfectly!

Hope someone could save 4-6 hours by this solution :D

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/