Question

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?

Was it helpful?

Solution

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.

OTHER TIPS

For me DTA was working fine. But Suddenly I started getting this same error.

For me the fix was this:

-> Go To Task Manager
-> Go To Processes Tab
-> Find and kill the DTA process. For me this process is named as 'DTASHELL.exe'

Now try to launch DTA. It should work now :-)

We had this problem in production code. It was failing on a small percentage of user's systems.

The error turns out to be in the microsoft code that we were using. It generates the IPC channel using the username.

ipc://APP_USER_000:SingeInstanceIPCChannel/SingleInstanceApplicationService

with certain characters in the username, this generates an invalid channel URL, so the receiving app fails to create the channel in the first place.

our fix is to use a hash of the username, rather than the first characters in the username.

(we were using the code here: http://blogs.microsoft.co.il/blogs/arik/archive/2010/05/28/wpf-single-instance-application.aspx )

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
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top