Reputation: 3427
We have a client which is written in .NET 2.0 (and it can not be changed). This client communicates with web service (no WCF, just plain asmx) written in .NET 4.0. Now we need to donload rather large files (200 MB) from the web service. There can be approx. 1000 clients connected at the same time and downloading. The current implementation of the ws method is very naive. The whole file (which si XML by the way) is read in memory as string and the string is returned.
Slightly better approach would be to read it as byte array as suggested here : but I think it is still wrong approach. The large file will be still in the memory (multiplied by base64 etc.)
The best way would be to use streaming. I know that the WCF is capable of streaming (e.g. here), but the WCF is probably not possible for us, as the client (.NET 2,0) would have to somehow use capability of the .NET 3.0 (by using its assemblies from WCF), which could be nasty.
Is there another possibility, how to ensure that server will be capable to server so many downloads of such big files?
Upvotes: 0
Views: 1344
Reputation: 8107
Ok, may be this posts will be helpful (I did not tested them, but looks like helpful):
Web services and large content in .NET 2.0
How to: Stream Large Amounts of Data from a Web Service
Upvotes: 2