Okay, here’s what I have…
On one server, a WCF hosted in IIS. This one handles a bunch of stuff for an ASP.NET application which resides on the same server (mostly db calls). In the ASP app, there’s an embedded iFrame which contains a PDF document viewer.
On another server, a WCF hosted in a Windows service. This one handles calls from the first WCF and kicks off a third-party document program which generates PDF files. For now, I have a dummy PDF file sitting on the C:\ drive to play with.
My mission: To somehow have a function in WCF #2 return a copy of the PDF document to WCF #1, which will save it to the local ASP application directory, so the embedded viewer can display it to a user.
So far I’ve tried having WCF #2 return a FileStream object but no luck there. I guess that’s a big no-no in the WCF world (I’m a noob).
I have no idea how to accomplish this, most of my efforts are proving futile. How would YOU handle this? Anyone?
Thanks!
Have WCF2 take the PDF and return it as a byte array:
WCF1 calls WCF2 and reads the byte array, then saves it to disk