IPC远程处理问题

发布于 2024-07-14 22:41:07 字数 197 浏览 6 评论 0原文

我们使用 IPC 时收到以下错误。
“无法连接到 IPC 端口:系统找不到指定的文件。” 该问题发生在 Windows 2003 服务器上。

当然,这只发生在生产中。 我们无法在我们的开发环境中重现这一点。

尝试使用 IPC 的 Windows 服务正在作为本地系统运行。

是否需要更改某种许可?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

埋情葬爱 2024-07-21 22:41:07

我们试图在频道启动之前访问它。 因此我们会收到“未找到”错误。 将访问代码包装在一些“真的准备好了吗”代码中解决了这个问题。

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.

下雨或天晴 2024-07-21 22:41:07

对我来说,DTA 工作得很好。 但突然我开始遇到同样的错误。

对我来说,解决方法是:

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

现在尝试启动 DTA。 现在应该可以工作了:-)

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 :-)

神经大条 2024-07-21 22:41:07

我们在生产代码中遇到了这个问题。 它在一小部分用户系统上失败了。

结果发现错误出在我们使用的微软代码中。 它使用用户名生成 IPC 通道。

ipc://APP_USER_000:SingeInstanceIPCChannel/SingleInstanceApplicationService

用户名中包含某些字符,这会生成无效的通道 URL,因此接收应用程序无法首先创建通道。

我们的解决方法是使用用户名的哈希值,而不是用户名中的第一个字符。

(我们在这里使用代码: http://blogs.microsoft.co.il/blogs/arik/archive/2010/05/28/wpf-single-instance-application.aspx)

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 )

香橙ぽ 2024-07-21 22:41:07

请发布您用于初始化服务器通道和发布对象的代码,以及您尝试访问远程对象时使用的 uri 的客户端代码。

设置通道名称时

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

一个常见的陷阱是当您使用字典初始化通道,并使用而不是

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

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
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文