locked
Accessing COM+ Components from Web Services RRS feed

  • Question

  • User-884088656 posted
    Hi, I am trying to provide a web service layer on top of legacy VB 6.0 COM+ component. I will be calling my web service from ASP.NET pages (which are hosted on another web server) and web service will in turn invoke the COM+ component. The problem is that I am receiving "Access Denied" error while calling COM+ component from web service. COM+ component is a simple VB 6.0 component that runs under the identity of a domain account. This is what I did: (1) Installed VB 6.0 COM component in COM+ server application and set the Identity of the application (On Identity tab in COM+) to the domain account. (2) Created a RCW for the VB 6.0 component using tlbimp.exe (3) Created a web services project and added a reference to the previously created RCW (4) Called a method on web service that creates above mentioned RCW object and calls a method on it; as soon as the object creation call is run in web service method, System.UnauthorizedAccessException is raised. Important exception details are as follows: COMPlusExceptionCode ==>> 0xe0434f4d HResult ==>> 0x80070005 Message ==>> "Access is denied." I have following software: * .NET Framework 1.1 * Windows 2003 Enterprise Server (In production, application will run on Windows 2000 and .NET framework 1.1) * IIS 6.0 * COM+ 1.5 I have following security settings: * IIS authentication is set to Annonymous * <authentication> mode is set to "None" in web service config file * Apart from that <authentication> element, web.config and machine.config files have all default settings; that means no impersonation, and request is run under default ASPNET account. What am I doing wrong here? Currently all component are on the same machine! Please help me out here; It is very urgent and I would really greatly appreciate any help in this regard. By the way, I have already gone through the following article (Knowledge Base Q325791) PRB: "Access Denied" Error Message Occurs When You Impersonate an Account in ASP.NET and Then Call STA COM Components According to this article: AspCompat is not available for Web Services (.asmx) so you must take a different approach. If the impersonated account is static, which means that you specify a userName and a password in the <identity> tag of Web.config or Machine.config, or if you always programmatically impersonate the same account, you can put the STA component in a COM+ Server Application and then set the identity of the application to the impersonated user. I also tried hard coding a domain user name and password in <identity> element in my web.config file but still the same error !!! Thanks, Hidden Desi
    Monday, September 22, 2003 8:35 AM

All replies

  • User-134989511 posted

     I have a server which wil be fetching live Prices and i have to convert this server into a com+ service which wil  be running on the server.. i to use the com + service in my aspx (i.e) webapplication . when ever the com + component raises a event  my webservice should be able to capture the event raised by the com+ service and maintain the state.. can we achieve this... Pls help me out

    Tuesday, November 18, 2008 7:12 AM
  • User-319574463 posted

     >S.Pramod

    Please ask your question on a new thread.

    Monday, November 24, 2008 6:59 AM
  • User-319574463 posted

    Hidden Desi

    Do you know the class name of the import? If so find the name in the Com+ explorer, and set permissions so the web service can access it.

    Monday, November 24, 2008 7:00 AM