I have a project and it needs to access a large amount of proprietary data in ASP.NET. This was done on the Linux/PHP by loading the data in shared memory. I was wondering if trying to use Memory Mapped Files would be the way to go, or if there is a better way with better .NET support. I was thinking of using the Data Cache but not sure of all the pitfalls of size of data being saved in the Cache.


Solution 1:

I know this is a bit late, but the .NET 4.0 framework now supports memory-mapped files out of the box:

http://blogs.msdn.com/salvapatuel/archive/2009/06/08/working-with-memory-mapped-files-in-net-4.aspx

Solution 2:

If you are looking for a Memory Mapped library for C#, take a peek at Tomas Restrepo's filemap wrapper. It's licensed under the LGPL.