Programmer's Highway

C# Tips and simple code

I'm very sorry for machine translation in English.

C# IPC Can not connect between different users

If the interprocess communication between different users, you must specify a user group to 'authorizedGroup' property. Each user must belong to the same user group.
Please check this page.
http://msdn.microsoft.com/library/en-us/ms172351.aspx

However, you do not know how to set the property in the description of the MSDN.
'authorizedGroup' property is set by the constructor of IpcServerChannel using Hashtable.

using System.Collections;
     // Create the channel.
     Hashtable properties = new Hashtable();
     properties.Add("portName""ipcSample");
     properties.Add("authorizedGroup""Users");
     IpcServerChannel channel = new IpcServerChannel(properties, null);
Visual Studio 2010 .NET Framework 4