views:

954

answers:

3

We are receiving the following error using IPC.
"Failed to connect to an IPC Port: The system cannot find the file specified." The issue is happening on a Windows 2003 server.

Of course it only happens in production. We are unable to reproduce this in our development environment.

The Windows service that is attempting to use IPC is running as Local System.

Is there some sort of permission that needs to be changed?

A: 

Please post the code you use to initialize the server channel and publish the object, and the client code with the uri you use when you try to access the remote object.

A common pitfall is when you initialize the channel with a dictionary, and set the name of the channel using

dic["name"] = "channelName";  
//used for retrieving the channel - ChannelServices.GetChannel("channelName");

instead of

dic["portName"] = "channelName";
//used as the identifier for the named pipe - 
//The client should get the object from the uri : ipc://channelName/objectName
Yoni Shalom
+1  A: 

We were attempting to access the channel before it was spun up. So we would receive the 'not found' error. Wrapping the access code in some 'is it really ready' code fixed the problem.

Danno
Danno: I'm having a similar problem here:http://stackoverflow.com/questions/1474787/determine-if-another-process-has-registered-a-channel-for-remotingWhat exactly did your "is it really ready" wrapper look like?
snicker
A: 

We are facing the same problem. I have to put thread.sleep() for some seconds before using actual object. Can you tell us how you managed to do 'is it really ready' wrapping?