I’m working on a web app that passes data to a custom client app.
I’m getting exceptions when the data is over some “small” size. Since the end users will likely be using increasingly larger data sizes, I switched the return from the WCF function to be the ID of the data set.
Next, I converted the client to use the ID to retrieve the data from some simple ASPX page. This works fine, but means an inconsistency in the interface.
-
Edit: I’m not sure how I missed returning a Stream, but I did. Does anyone have problems with Streams over WCF?
-
Other than a dropped connection, are there any issues in reading files via HTTP streams from an ASPX page?
I would presume that I’m missing a capability of WCF (like oob data). But then, the C#/.NET on-line help is either pretty poor or else seriously broken as installed on my machine.
Thanks.
[Edit] By the way, in my case the “large amount of data” is user-input driven, but will need to be at least 20MiB.
As I understand the Large Data and Streaming article mentioned by @Eugene,
one must switch transport mode for all communication, meaning it turns off some integrity checks.
Consequently, I ended up with using a semi-custom HTTP client class where:
client app’s disk file,
the file to the server’s disk with that GUID as part of its name. It then
calls a WCF method to pass the other parameters with the GUID in lieu of
the file data.
It isn’t beautiful but it works. Unfortunately, an IIS or client app crash could
leave the temp files on the server hard drive, but they’re localized and could be
cleaned up on service creation.