[英]How do I grant access to my COM+ application?
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:我创建了一个 COM+ 服务器应用程序,但调用者无法访问它 - 当它尝试从该应用程序实例化 COM object ( CoCreateInstance()
) 时,系统日志中会显示以下内容:
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). 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地址 LocalHost(使用 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.调整 COM+ 访问的唯一方法似乎是使用角色,但应用程序未选中“强制访问检查”,因此看起来应该没有限制。 Yet the object won't instantiate.然而 object 不会实例化。
How do I allow a certain user access a specific COM+ application so that he can instantiate objects from there?如何允许某个用户访问特定的 COM+ 应用程序,以便他可以从那里实例化对象?
The first thing you should do is check to see if you can create this object outside of the application.您应该做的第一件事是检查您是否可以在应用程序之外创建此 object。 I am using vbscript here;我在这里使用 vbscript;
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.如果您无法创建 object,那么 .dll 可能存在问题,您最好将组件从注册表中擦除并完全重新安装/重新实现它。
If you can create the object, there is an issue with the application accessing the component.如果您可以创建 object,则说明应用程序访问组件时存在问题。 This is usually due to one of the following reasons;这通常是由于以下原因之一;
Component Security settings组件安全设置
User settings用户设置
Mismatch between Component services and the registry组件服务和注册表不匹配
If none of this works, search the registry for the component's name and wipe it out.如果这些都不起作用,请在注册表中搜索组件的名称并将其清除。 then reinstall.然后重新安装。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.