interprocess
interprocess copied to clipboard
System.UnauthorizedAccessException: 'Access to the path is denied.' When Create Publisher
Hi On windows, there is System.UnauthorizedAccessException: 'Access to the path is denied.' if the publisher and subscriber are created by different accounts in different processes. for example, a windows service process create a subscriber, later, when an user application try to create the publisher, the exception will be thrown. Can we create the memory mapped file that can be accessed by all everyone?
Thanks
@cbfrank . Same problem here, when running the Main application as Windows Service under LocalSystem Account. The other apps running under a normal account can't access the Queue Semaphore with Access denied error. I made a patch to Cloudtoid.Interprocess package to make the Named Semaphore accessible to Everyone.. Check the solution here https://github.com/fabalo76/interprocess/tree/WinSemaphoreACLs
As this is an unofficial branch (pending to merge with official branch) and only tested in Windows ,you have to install the package manually in your visual studio. You could compile it by yourself or try my binary package Cloudtoid.Interprocess.1.0.156.zip
Check the source code for Semaphore/Windows/SemaphoreWindows.cs
@fabalo76 I'm not sure giving the Everyone account full control is the best idea from a security perspective. Ideally, you'd be able to configure it, so you can grant the required access rights only for the actual accounts at either end of the pipe.
Hey folks, any suggestions on the best way to provide a solution here? I'd be happy to implement it.