Why would MemoryMappedFile.CreateNew in Global space fail with UnauthorizedAccess even with Visual Studio being run as admin?

Jeff Bailey 0 Reputation points
2023-04-20T21:16:14.34+00:00

VS 2019 16.11.24 targeting Framework 4.7.2 Windows 10 Unit tests are failing on a call to MemoryMappedFile.CreateNew("Global/someName") with "System.UnauthorizedAccessException : Access to the path is denied.". Running Visual Studio as admin makes no difference, and this seems to be the only accepted cause for the problem. What else can I look at since that doesn't help? Are there separate privilidges for theUnit Test Session Manager? I can't imagine so. Is there another way for me to isolate the issue? Appreciate any info.

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,687 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,369 questions
Visual Studio Testing
Visual Studio Testing
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Testing: The act or process of applying tests as a means of analysis or diagnosis.
331 questions
{count} votes