Re: streaming reports from report services
Brought to you by:
wrowe
From: David M. <wo...@su...> - 2008-10-21 16:24:22
|
<HTML> <P>I'm getting there but still don't have it. Instead of using the END method on the response I used FLUSH followed with CLOSE. The report did stream to the client at that point, and the open, save, cancel dialog appeared. But when I clicked open, Adobe said the report was corrupted. Upon examining with notepad, the entire report was there, but followed with page output beginning with doctype and the whole nine yards. If deleted from the file, Adobe would display the report just fine!</P> <P>So I tried to see if I could stop output of the page. Obviously the CLOSE method on the response is not really closing the socket as the documentation says. I declared a common boolean value to be set by the report method, and if found in the render method, rendering was skipped. That does not work. Unless the page is allowed to render in the normal fashion, Apache sends an error page to the client saying the server is misconfigured. I tried substituting report content at the point of rendering, but get the same Apache error page.</P> <P>It would seem Apache is buffering the output and only sends the output if constructed properly. Otherwise it sends nothing generated by ASP.NET and sends the error page instead.</P> <P>I don't know how Apache knows whether the ASP.NET page did a normal page rendering. If bytes are written to the response, that should be the way it is. Apache must be examining the outgoing headers. But, Apache must not be examining the start of the stream, but the entire stream, since Apache let the stream pass even if normal page rendering was at the end.</P> <P>To resolve this I need to know exactly what Apache needs to see in the stream to approve it. I can also cancel normal page rendering, to leave the report, only. Maybe Apache doesn't allow the kind of stream I'm trying to write. Is there a validation feature I can turn off?<BR> <BR> -- <BR> dgm <BR> <BR> <BR> <B>On Tue Oct 21 9:41 , David McDivitt <WO...@SU...>sent:<BR> <BR> </P></B> <BLOCKQUOTE style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #f5f5f5 2px solid; MARGIN-RIGHT: 0px"> <P>I ran the report from IIS again with the same debug information. The same error occurs with IIS as the server, but the report streams out anyway. I guess IIS processes whatever content is generated immediately, then attempts to close the response as told to do in the code, and because a valid stream has been received at the client, the client renders it. There is no indication an error occurred because there's no response stream or anything left to write the error description, and the thread just goes away. But with Apache, the response is not being controlled so discreetly.</P> <P>What I can do is completely substitute output by overriding the Render event for the page. Now I am ending the response abruptly without knowing an error was occurring. Instead I should substitute the report into the response and allow ASP.NET to close the thread normally.<BR> <BR> -- <BR> dgm <BR> </P></BLOCKQUOTE></HTML> <BR> |