Код: Выделить всё
var security = new MemoryMappedFileSecurity();
security.SetAccessRule(new AccessRule(new SecurityIdentifier(WellKnownSidType.WorldSid, null), MemoryMappedFileRights.FullControl, AccessControlType.Allow));
MemoryMappedFile memoryMappedFile = MemoryMappedFile.CreateFromFile(
new FileStream(path, FileMode.Open, FileAccess.Write, FileShare.ReadWrite),
"MMFName",
100000000,
MemoryMappedFileAccess.ReadWrite,
security,
HandleInheritability.None,
false
);
Пробовал MemoryMappedFileSecurity и попробовал запустить в режиме администратора.
Подробнее здесь: https://stackoverflow.com/questions/786 ... -is-denied
Мобильная версия