I have created a download service and modeled it on the asset service. Users of my application must be able to download fairly large files, and the application works for the most part, however we've had a few exceptional cases where the files were really huge (>2 Gb).
The asset service uses WebResponse and sets its content length, and I was doing likewise, however the setContentLength takes an integer, and so the really large files are causing an overflow error. My question is, is there a technical reason why the contentLength is an integer and not a long, or was that an arbitrary decision (can web responses be >2Gb)? If it is technically possible to have responses >2Gb, can I get around this by simply not setting the contentLength and just streaming the resulting bytes, instead, or is that not safe. Thanks for your help.
