如何授予对我的 COM+ 的访问权限应用?

发布于 2024-11-14 19:49:58 字数 461 浏览 2 评论 0原文

我创建了一个 COM+ 服务器应用程序,但调用者无法访问它 - 当它尝试从该应用程序实例化 COM 对象 (CoCreateInstance()) 时,系统日志中会显示以下内容:

特定于应用程序的权限设置不会向用户 MACHINENAME\administrator SID (SID此处)来自地址 LocalHost(使用 LRPC)。可以使用组件服务管理工具修改此安全权限。

调整 COM+ 访问的唯一方法似乎是使用 角色,但应用程序未选中“强制访问检查”,因此看起来应该没有限制。但该对象不会实例化。

如何允许某个用户访问特定的 COM+ 应用程序,以便他可以从那里实例化对象?

I've created a COM+ server application and the caller can't access it - when it tries to instantiate a COM object (CoCreateInstance()) from that application the following appears in system log:

The application-specific permission settings do not grant Local Activation permission for the COM Server application with CLSID {class id of COM object here} and APPID {app id of the COM+ application here} to the user MACHINENAME\administrator SID (SID here) from address LocalHost (Using LRPC). This security permission can be modified using the Component Services administrative tool.

The only way to tweak COM+ access seems to be using roles but the application has "enforce access checks" unchecked so it looks like there should be no restrictions. Yet the object won't instantiate.

How do I allow a certain user access a specific COM+ application so that he can instantiate objects from there?

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

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

发布评论

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

评论(1

若言繁花未落 2024-11-21 19:49:58

您应该做的第一件事是检查是否可以在应用程序外部创建此对象。我这里使用vbscript;

dim vvv
set vvv= CreateObject ("CoCreateInstance()")

if isnull(vvv) then
            msgbox "null"
else
            msgbox "not null"
end if

如果您无法创建该对象,则 .dll 可能存在问题,最好的方法可能是从注册表中删除该组件并完全重新安装/重新实现它。

如果您可以创建该对象,则说明访问该组件的应用程序存在问题。这通常是由于以下原因之一造成的;

  1. 组件安全设置

    • 为了查找问题,您有权取消选中“强制访问检查”。确保取消选中应用程序(包)级别和组件级别的复选框。
  2. 用户设置

    • 查看此链接。除了他们的建议之外,还可以尝试将 IUSR_servername 添加为管理员成员。
  3. 组件服务与注册表不匹配

    • 我们需要确保组件服务中的 CLSID 与注册表匹配。在组件服务中,查找组件(而不是应用程序)并查看属性。如果该组件在那里,则它已明确注册。当您在这里时,我们不妨仔细检查一些设置。 DLL 地址有效吗?安全、交易和激活设置是否正确?好的,现在请注意常规选项卡中的 CLSID。进入注册表编辑器并在 HKEY_CLASSES_ROOT 中找到 CLSID(它应该在那里)。确保 dll 地址和 ProgID 正确。还要验证密钥和子密钥的结构与其他组件的结构类似。

如果这些都不起作用,请在注册表中搜索该组件的名称并将其删除。然后重新安装。

The first thing you should do is check to see if you can create this object outside of the application. I am using vbscript here;

dim vvv
set vvv= CreateObject ("CoCreateInstance()")

if isnull(vvv) then
            msgbox "null"
else
            msgbox "not null"
end if

If you cannot create the object, then there is probably an issue with the .dll and you might be best served just wiping the component out of the registry and completely reinstalling/reimplementing it.

If you can create the object, there is an issue with the application accessing the component. This is usually due to one of the following reasons;

  1. Component Security settings

    • For the purposes of finding the issue, you are right to uncheck "enforce access checks". Make sure you uncheck the box at both the application (package) level AND the component level.
  2. User settings

    • Check out this link. In addition to their advice, try adding IUSR_servername as a member of Administrators.
  3. Mismatch between Component services and the registry

    • We need to make sure the CLSID's in Component services match the registry. In component services, look for the component (not the application) and look at the properties. If the component is in there, it is definetely registered. While you are here we might as well double check some settings. Is the DLL address valid? Are security, transactions and activation settings correct? OK, now notice the CLSID in the general tab. Go into the registry editor and find the CLSID in HKEY_CLASSES_ROOT (it should be there). Make sure the dll address and the ProgID are correct. Also verify the key and subkeys are structured in a similar way to your other components.

If none of this works, search the registry for the component's name and wipe it out. then reinstall.

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