I have a pdf on one server I need to pass on another server. Both have WCF’s published to them.
On the ‘serving’ server, I have the following code (thanks antisanity!):
Function GetPDF(ByVal fileName as String) as FileStream
Return File.OpenRead(fileName);
End Function
But I have no idea how to actually write the file on my ‘receiving’ server. I’ve been playing with System.IO, but I’m not having much luck. I need something like:
Sub WritePDF()
System.IO.WriteFile(MyService.GetPDF(“Test.pdf”), “C:\NewPDF.pdf”)
End Sub
Any ideas on this would be greatly apprecaited!
Thanks,
Jason
I believe this is what you’re looking for:
.Net 4:
.Net 2.0/3.5: