.net 4.0 creating a MemoryMappedFile with global context throws exception

Posted by Christoph on Stack Overflow See other posts from Stack Overflow or by Christoph
Published on 2010-05-05T11:54:01Z Indexed on 2010/05/05 11:58 UTC
Read the original article Hit count: 337

Filed under:
|
|

Hi all,

I want to create a global MemoryMappedFile in C# 4.0 using following call:

string MemoryMappedFileName = "Global\\20E9C857-C944-4C35-B937-A5941034D073";
ioBuffer = MemoryMappedFile.CreateNew(MemoryMappedFileName, totalIoBufferSize);

This always throws following exception "System.UnauthorizedAccessException: Access to the path is denied." If I remove the "Global\" identifier from the memorymapped filename it works but I need a memory mapped file existing accross terminal sessions.

thanks, Christoph

© Stack Overflow or respective owner

Related posts about c#

Related posts about ipc