IPC远程处理问题
我们使用 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我们试图在频道启动之前访问它。 因此我们会收到“未找到”错误。 将访问代码包装在一些“真的准备好了吗”代码中解决了这个问题。
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.
对我来说,DTA 工作得很好。 但突然我开始遇到同样的错误。
对我来说,解决方法是:
现在尝试启动 DTA。 现在应该可以工作了:-)
For me DTA was working fine. But Suddenly I started getting this same error.
For me the fix was this:
Now try to launch DTA. It should work now :-)
我们在生产代码中遇到了这个问题。 它在一小部分用户系统上失败了。
结果发现错误出在我们使用的微软代码中。 它使用用户名生成 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 )
请发布您用于初始化服务器通道和发布对象的代码,以及您尝试访问远程对象时使用的 uri 的客户端代码。
设置通道名称时
一个常见的陷阱是当您使用字典初始化通道,并使用而不是
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
instead of