2 years ago
#38072
Vadim
Interaction between WPF and UWP by named pipes
I'm trying create XBox Game Bar application (UWP). It has to receive some data from main WPF app. I use named pipes as it's described here. WPF creates server stream this way:
PipeSecurity pipeSecurity = new PipeSecurity();
pipeSecurity.AddAccessRule(new PipeAccessRule(new SecurityIdentifier(WellKnownSidType.WorldSid, null),
PipeAccessRights.ReadWrite, AccessControlType.Allow));
using (var pipe = NamedPipeServerStreamAcl.Create("PipesOfPiece", PipeDirection.InOut, 1,
PipeTransmissionMode.Message, PipeOptions.None, 0, 0, pipeSecurity))
{
pipe.WaitForConnection();
}
And UWP app creates client:
_clientStream = new NamedPipeClientStream("PipesOfPiece");
_clientStream.Connect();
On
_clientStream.Connect()
UWP app get error: System.UnauthorizedAccessException: Access to the path is denied.
Does anyone know what is wrong here?
c#
windows
uwp
named-pipes
sid
0 Answers
Your Answer