Well now, just when I think I’m done with this little project they throw me another curve…
I have two WCFs. One hosted in IIS and the other is in a self-hosted service on a different server.
A function in the self-hosted service returns a PDF in the form of Byte(). The WCF in IIS calls the function, then uses System.IO.FileStream to write the PDF to intepub. The aspx performs a callback, and the page is reloaded with a dynamic iFrame displaying the pdf. Works good enough for me, but not good enough for the boss.
Somehow, I have to get the second WCF to pass the PDF back to my ASP app WITHOUT saving it to disk.
I need something like:
iFrameControl.Attributes.Add("src", ServiceReference1.GetPDF_Byte())
Any way to do this?
Thanks in advance,
Jason
Found it somewhere else in C and did a conversion, posting here just in case someone else needs it.
Answer: Create a new class (Globals.vb) to house a byte array that can be accessed from both pages, then create a new page and do a response.BinaryWrite your byte array in Page Load, and set the iFrame’s src to the new (blank) page.