Running as a Service
Closed this issue · 4 comments
I've been working on a service that runs in session 0 on windows 7+ machines, and launches a GUI in the user's session that allows me to do certain things with System access.
However, I can't get the processes to communicate with TinyIpc. If I run my service as a normal program, it works without any changes, but as soon as it's running as System (in session 0) it fails to receive messages from TinyIpc.
Client:
TinyMessageBus ipc = new TinyMessageBus("test");
ipc.PublishAsync(CreateHelloPacket());
Service:
ipc = new TinyMessageBus("test");
ipc.MessageReceived +=
(sender, e) => OnMessage(e.Message);
private void OnMessage(byte[] message)
{
//...
}
Any ideas on how to get them to communicate together?
For anyone having the same issue, I unfortunately had to switch to named pipes and run the pipe server in the client (in the user's session), and the client in session 0 to get around the integrity/access issues.
I'm closing this old issue, I never knew what to do about it.
Thinking back on this, I believe what I had to do was use a different library that allowed me to run the server in the user's session and connect to it from session 0. The connection works when connecting from secure -> insecure, but not the other way around.
Ah, I see. Thanks for the info, not easy to remember after almost 4 years. 😄