Access denied while calling COM+ component from web wervice

Discussion in 'ASP .Net Security' started by Hidden Desi, Sep 22, 2003.

  1. Hidden Desi

    Hidden Desi Guest

    Hello,
    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.

    Thanks,
    Hidden Desi


    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 !!!
     
    Hidden Desi, Sep 22, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Stan
    Replies:
    9
    Views:
    3,092
    Steven Cheng[MSFT]
    Oct 1, 2004
  2. Replies:
    0
    Views:
    1,732
  3. Rudy Meijer

    Access denied when calling COM component.

    Rudy Meijer, Sep 22, 2003, in forum: ASP .Net Security
    Replies:
    0
    Views:
    117
    Rudy Meijer
    Sep 22, 2003
  4. YE WINT NYEIN

    HOW TO CALL C# WEB WERVICE FROM ASP

    YE WINT NYEIN, Oct 22, 2003, in forum: ASP .Net Web Services
    Replies:
    1
    Views:
    120
    Murdock
    Oct 23, 2003
  5. D-Someone
    Replies:
    1
    Views:
    143
    D-Someone
    Aug 18, 2006
Loading...

Share This Page