Share via


Are you getting OutOfMemoryExceptions when uploading large files?

Getting OutOfMemoryExceptions when uploading large files is a very common problem and we troubleshoot it quite frequently at Microsoft GTSC.

JohanS has a very nice entry on his blog and I can't resist myself to link to the solution which he provided!

<snip>

Problem:
Using the WebClient.Upload method for posting large files will eventually leave you stranded with OutOfMemoryExceptions.

Cause:
WebClient.Upload reads the entire file to memory by default.

Resolution:
Build your own uploader. Please click this link to read more!

</snip> 

Thanks Johan, and please keep these coming!

Cheers,
Rahul