ASP.NET and Remoting: “Failed to connect to an IPC Port: Access is denied.”

asp.netipcremoting

I have a c# .NET 2.0 Windows Service that listens on an IPC port for remoting requests. The service runs as the "Local Service" account.

I have an ASP.NET application that attempts to make calls on the remoted objects. The ASP.NET application runs on XP as IUSR_MachineName. Calls on the remoted objects are failing with the error:

Failed to connect to an IPC Port: Access is denied.

I did some research and most solutions indicate that I need to set the "authorizedGroup" property on the remoting channel to a group that I want to allow to access to the IPC port. So I did the following:

  1. Changed my code to allow "Everyone" access to the IPC port:
   HashTable table; // properties
   //...
   table.Add("authorizedGroup", "Everyone");                          

   table.Add("portName", name);
   // etc
   IpcChannel  channel = new IpcChannel(table, clientSink,
   serverSink);

2 . Then I added IUSR_MachineName to the local "Users" group on my machine, which I was hoping would make it included in the "Everyone" alias.

But I tried to run it again and i am still getting "Failed to connect to an IPC Port: Access is denied."

Any ideas?

Best Answer

I encountered the same problem, and this post solved it

It seems that windows service has some additional control over accounts.

Practically, you need to set authorizedGroup = "Everyone" both on server and client side.