ASP.NET 和远程处理:“无法连接到 IPC 端口:访问被拒绝。”
我有 ac# .NET 2.0 Windows 服务,它在 IPC 端口上侦听远程请求。 该服务作为“本地服务”帐户运行。
我有一个 ASP.NET 应用程序尝试调用远程对象。 ASP.NET 应用程序在 XP 上以 IUSR_MachineName 身份运行。 对远程对象的调用失败并出现错误:
Failed to connect to an IPC Port: Access is denied.
我做了一些研究,大多数解决方案表明我需要将远程通道上的“authorizedGroup”属性设置为我想要允许访问 IPC 端口的组。 所以我做了以下操作:
- 更改我的代码以允许“每个人”访问 IPC 端口:
HashTable 表; // 特性 //... table.Add("authorizedGroup", "Everyone"); 表.Add("端口名称", 名称); // ETC IpcChannel 通道 = new IpcChannel(表, clientSink, 服务器接收器);
2. 然后我将 IUSR_MachineName 添加到我的计算机上的本地“Users”组,我希望这会将其包含在“Everyone”别名中。
但我尝试再次运行它,但仍然收到“无法连接到 IPC 端口:访问被拒绝”的消息。
有任何想法吗?
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:
- 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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我遇到了同样的问题,并且 这篇 帖子解决了这个问题
Windows 服务似乎对帐户有一些额外的控制。
实际上,您需要在服务器端和客户端都设置authorizedGroup =“Everyone”。
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.