title: How to store & retrieve uploaded images across Load Balanced servers with ASP.NET?
body: <p>My ASP.NET MVC application will be deployed to a series of load-balanced web servers. One problem I'm still working out is how to handle dynamically-uploaded file content, such as user-uploaded images -- obviously, saving them on the server where they were uploaded won't allow them to be accessed from the other servers in the load balanced group.</p>
  
  <p>Currently I'm planning to save these to a shared storage location, specifically a UNC path referring to a directory on our NAS; but I'm not sure how best to retrieve these files to display them to the client. I'm thinking I'll need to write a custom route handler of some kind to retrieve them from the non-web-accessible storage location on the server side and then stream them back to the client. This seems relatively straightforward to do, yet I'm struggling with how to begin to approach this in ASP.NET.</p>
  
  <p>Another solution I've considered is creating a Virtual Directory in each application directory which points to the network directory.</p>
  
  <p>I've even considered uploading the files to Amazon S3 (via the file upload handling code) and using CloudFront to delivery them, but I'd rather avoid the external service dependency.</p>
  
  <p>Which approach do you recommend, and are there established best practices or even existing components/libraries available for accomplishing this sort of thing?</p>