FIX: Error When You Apply COM+ Role-Based Security to Java COM Interfaces (282834)
The information in this article applies to:
- Microsoft virtual machine, when used with:
- the operating system: Microsoft Windows 2000
- Microsoft Visual J++ 6.0
This article was previously published under Q282834 SYMPTOMS
When you use COM+ to apply role-based security to a Visual J++ COM component custom interface, subsequent access to that interface results in a "Permission denied" (0x800A0046) error if the interface is called from Windows Scripting Host.
CAUSE
The Microsoft virtual machine (Microsoft VM) automatically implements an IDispatchEx interface, which the Scripting Host uses as the preferred interface when it invokes methods on the object. However, COM+ role-based security is applied to the custom interface that is defined by the user (IMyInterface_Dispatch). Therefore, COM+ expects calls to come in on IMyInterface_Dispatch but instead receives calls on IDispatchEx; the caller is denied permission because of this mismatch.
RESOLUTIONA supported fix is now available from Microsoft, but it is only intended to correct the problem that is described in this article. Apply it only to computers that are experiencing this specific problem. This fix may receive additional testing. Therefore, if you are not severely affected by this problem, Microsoft recommends that you wait for the next Windows 2000 service pack that contains this hotfix. To resolve this problem immediately, contact Microsoft Product Support Services to obtain the fix. For a complete list of Microsoft Product Support Services phone numbers and information about support costs, visit the following Microsoft Web site: NOTE: In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The typical support costs will apply to additional support questions and issues that do not qualify for the specific update in question.
This fix is included with the fixes that are described in the following Microsoft Knowledge Base article:
WORKAROUND
To work around this problem, use the com.ms.com.NoAutoScripting interface placeholder to disable automatic scripting support, and then declare a dual custom interface. This removes the IDispatchEx implementation, and the Scripting Host uses the custom interface instead.
For additional information about how to use the com.ms.com.NoAutoScripting interface placeholder to disable automatic scripting support, click the article number below to view the article in the Microsoft Knowledge Base:
172202 INFO: Implementing Java Automation Objects using AutoIDispatch
For additional information about how to declare a dual custom interface, click the article number below
to view the article in the Microsoft Knowledge Base:
196894 HOWTO: Create Dual Interface COM Objects Using VJ++ 6.0
STATUSMicrosoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.
Modification Type: | Major | Last Reviewed: | 10/13/2006 |
---|
Keywords: | kbBug kberrmsg kbfix kbJava kbWin2000PreSP3Fix KB282834 |
---|
|