COM+ C# newbie....

Discussion in 'ASP .Net' started by Guest, Dec 1, 2003.

  1. Guest

    Guest Guest

    I have a class that has the COM+ attributes to make it an object pool and
    transactional, I have strong-named the DLL and all the DLL's that it uses.

    I have used regsvcs.exe to register it in the COM+ catalog, I can see it in
    the catalog but.....

    When I use it from a web service I get the following error when attempting
    to create the object in the web service

    'The ServicedComponent being invoked is not correctly configured (Use
    RegSvcs to re-register).'

    I am using framework 1.1 with Windows 2000 Server SP3

    Any Ideas?

    Cheers

    Ollie
    Guest, Dec 1, 2003
    #1
    1. Advertising

  2. Ollie,

    Do you have any code in your COM+ component that requires certain user
    rights? Is the component configured correctly to be used by the ASPNET user
    that ASP.NET is running your page under (most likely, if you haven't changed
    the defaults).

    If you have been able to call this component in a console or windows
    forms app, then it is most likely a rights issue with the ASPNET user.

    Hope this helps.


    --
    - Nicholas Paldino [.NET/C# MVP]
    -

    <ooo> wrote in message news:...
    > I have a class that has the COM+ attributes to make it an object pool and
    > transactional, I have strong-named the DLL and all the DLL's that it uses.
    >
    > I have used regsvcs.exe to register it in the COM+ catalog, I can see it

    in
    > the catalog but.....
    >
    > When I use it from a web service I get the following error when attempting
    > to create the object in the web service
    >
    > 'The ServicedComponent being invoked is not correctly configured (Use
    > RegSvcs to re-register).'
    >
    > I am using framework 1.1 with Windows 2000 Server SP3
    >
    > Any Ideas?
    >
    > Cheers
    >
    > Ollie
    >
    >
    Nicholas Paldino [.NET/C# MVP], Dec 1, 2003
    #2
    1. Advertising

  3. Guest

    Gawelek Guest

    > .... all the DLL's that it uses.
    Are they registered in GAC ?

    Gawel
    Gawelek, Dec 1, 2003
    #3
  4. Guest

    Guest Guest

    Nick,

    I have it running in a normal asp.net, I am trying to move some business
    logic to an 'out of process' server so I thought I would try to get it to
    run in the local COM+ catalog first...

    Cheers

    Ollie
    "Nicholas Paldino [.NET/C# MVP]" <> wrote in
    message news:...
    > Ollie,
    >
    > Do you have any code in your COM+ component that requires certain user
    > rights? Is the component configured correctly to be used by the ASPNET

    user
    > that ASP.NET is running your page under (most likely, if you haven't

    changed
    > the defaults).
    >
    > If you have been able to call this component in a console or windows
    > forms app, then it is most likely a rights issue with the ASPNET user.
    >
    > Hope this helps.
    >
    >
    > --
    > - Nicholas Paldino [.NET/C# MVP]
    > -
    >
    > <ooo> wrote in message news:...
    > > I have a class that has the COM+ attributes to make it an object pool

    and
    > > transactional, I have strong-named the DLL and all the DLL's that it

    uses.
    > >
    > > I have used regsvcs.exe to register it in the COM+ catalog, I can see it

    > in
    > > the catalog but.....
    > >
    > > When I use it from a web service I get the following error when

    attempting
    > > to create the object in the web service
    > >
    > > 'The ServicedComponent being invoked is not correctly configured (Use
    > > RegSvcs to re-register).'
    > >
    > > I am using framework 1.1 with Windows 2000 Server SP3
    > >
    > > Any Ideas?
    > >
    > > Cheers
    > >
    > > Ollie
    > >
    > >

    >
    >
    Guest, Dec 1, 2003
    #4
  5. Guest

    Guest Guest

    yes all the DLL it uses are in the GAC, does it have to be in the GAC as
    well?

    Ollie

    "Gawelek" <> wrote in message
    news:%...
    > > .... all the DLL's that it uses.

    > Are they registered in GAC ?
    >
    > Gawel
    >
    >
    Guest, Dec 1, 2003
    #5
  6. Try first to use it from a console program.

    Willy.

    <ooo> wrote in message news:...
    > I have a class that has the COM+ attributes to make it an object pool and
    > transactional, I have strong-named the DLL and all the DLL's that it uses.
    >
    > I have used regsvcs.exe to register it in the COM+ catalog, I can see it

    in
    > the catalog but.....
    >
    > When I use it from a web service I get the following error when attempting
    > to create the object in the web service
    >
    > 'The ServicedComponent being invoked is not correctly configured (Use
    > RegSvcs to re-register).'
    >
    > I am using framework 1.1 with Windows 2000 Server SP3
    >
    > Any Ideas?
    >
    > Cheers
    >
    > Ollie
    >
    >
    Willy Denoyette [MVP], Dec 1, 2003
    #6
  7. Guest

    Guest Guest

    cheers willy, I am trying it in a coneoloe app now and it works....

    But where would I put application config values that I normally put the in
    the application.config file for a COM+ component?

    I have tried putting them in the xml config fiel for my test harness but it
    is not reading the values ?

    Any one have any ideas?

    Cheers

    Ollie

    "Willy Denoyette [MVP]" <> wrote in message
    news:...
    > Try first to use it from a console program.
    >
    > Willy.
    >
    > <ooo> wrote in message news:...
    > > I have a class that has the COM+ attributes to make it an object pool

    and
    > > transactional, I have strong-named the DLL and all the DLL's that it

    uses.
    > >
    > > I have used regsvcs.exe to register it in the COM+ catalog, I can see it

    > in
    > > the catalog but.....
    > >
    > > When I use it from a web service I get the following error when

    attempting
    > > to create the object in the web service
    > >
    > > 'The ServicedComponent being invoked is not correctly configured (Use
    > > RegSvcs to re-register).'
    > >
    > > I am using framework 1.1 with Windows 2000 Server SP3
    > >
    > > Any Ideas?
    > >
    > > Cheers
    > >
    > > Ollie
    > >
    > >

    >
    >
    Guest, Dec 1, 2003
    #7
  8. Ollie,

    If it works in a console app and not an ASP.NET app, then you need to
    configure the user in the web.config file for where the page resides (you
    can impersonate a user for that directory, for example). Or, you can
    imitate a user through code (look at the documentation for the Impersonate
    method on the WindowsIdentity class for an example of how to do this).

    Also, you could also set the security of the COM+ component so that it
    allows all users to execute it (don't make it run in the context of the
    currently logged in user, especially if this is running in IIS).

    Hope this helps.


    --
    - Nicholas Paldino [.NET/C# MVP]
    -

    <ooo> wrote in message news:%...
    > cheers willy, I am trying it in a coneoloe app now and it works....
    >
    > But where would I put application config values that I normally put the in
    > the application.config file for a COM+ component?
    >
    > I have tried putting them in the xml config fiel for my test harness but

    it
    > is not reading the values ?
    >
    > Any one have any ideas?
    >
    > Cheers
    >
    > Ollie
    >
    > "Willy Denoyette [MVP]" <> wrote in message
    > news:...
    > > Try first to use it from a console program.
    > >
    > > Willy.
    > >
    > > <ooo> wrote in message news:...
    > > > I have a class that has the COM+ attributes to make it an object pool

    > and
    > > > transactional, I have strong-named the DLL and all the DLL's that it

    > uses.
    > > >
    > > > I have used regsvcs.exe to register it in the COM+ catalog, I can see

    it
    > > in
    > > > the catalog but.....
    > > >
    > > > When I use it from a web service I get the following error when

    > attempting
    > > > to create the object in the web service
    > > >
    > > > 'The ServicedComponent being invoked is not correctly configured (Use
    > > > RegSvcs to re-register).'
    > > >
    > > > I am using framework 1.1 with Windows 2000 Server SP3
    > > >
    > > > Any Ideas?
    > > >
    > > > Cheers
    > > >
    > > > Ollie
    > > >
    > > >

    > >
    > >

    >
    >
    Nicholas Paldino [.NET/C# MVP], Dec 1, 2003
    #8
  9. Guest

    Guest Guest

    cheers Nick....

    How can I use the app config setting that used to be stored in the
    web.config xml file for the ASP.Net web service?

    Cheers

    Ollie

    "Nicholas Paldino [.NET/C# MVP]" <> wrote in
    message news:uZYO$...
    > Ollie,
    >
    > If it works in a console app and not an ASP.NET app, then you need to
    > configure the user in the web.config file for where the page resides (you
    > can impersonate a user for that directory, for example). Or, you can
    > imitate a user through code (look at the documentation for the Impersonate
    > method on the WindowsIdentity class for an example of how to do this).
    >
    > Also, you could also set the security of the COM+ component so that it
    > allows all users to execute it (don't make it run in the context of the
    > currently logged in user, especially if this is running in IIS).
    >
    > Hope this helps.
    >
    >
    > --
    > - Nicholas Paldino [.NET/C# MVP]
    > -
    >
    > <ooo> wrote in message news:%...
    > > cheers willy, I am trying it in a coneoloe app now and it works....
    > >
    > > But where would I put application config values that I normally put the

    in
    > > the application.config file for a COM+ component?
    > >
    > > I have tried putting them in the xml config fiel for my test harness but

    > it
    > > is not reading the values ?
    > >
    > > Any one have any ideas?
    > >
    > > Cheers
    > >
    > > Ollie
    > >
    > > "Willy Denoyette [MVP]" <> wrote in message
    > > news:...
    > > > Try first to use it from a console program.
    > > >
    > > > Willy.
    > > >
    > > > <ooo> wrote in message news:...
    > > > > I have a class that has the COM+ attributes to make it an object

    pool
    > > and
    > > > > transactional, I have strong-named the DLL and all the DLL's that it

    > > uses.
    > > > >
    > > > > I have used regsvcs.exe to register it in the COM+ catalog, I can

    see
    > it
    > > > in
    > > > > the catalog but.....
    > > > >
    > > > > When I use it from a web service I get the following error when

    > > attempting
    > > > > to create the object in the web service
    > > > >
    > > > > 'The ServicedComponent being invoked is not correctly configured

    (Use
    > > > > RegSvcs to re-register).'
    > > > >
    > > > > I am using framework 1.1 with Windows 2000 Server SP3
    > > > >
    > > > > Any Ideas?
    > > > >
    > > > > Cheers
    > > > >
    > > > > Ollie
    > > > >
    > > > >
    > > >
    > > >

    > >
    > >

    >
    >
    Guest, Dec 1, 2003
    #9
  10. Forget about this for a moment and return to your asp.net page and try to
    run this in aspcomp mode.

    Willy.

    <ooo> wrote in message news:%...
    > cheers willy, I am trying it in a coneoloe app now and it works....
    >
    > But where would I put application config values that I normally put the in
    > the application.config file for a COM+ component?
    >
    > I have tried putting them in the xml config fiel for my test harness but

    it
    > is not reading the values ?
    >
    > Any one have any ideas?
    >
    > Cheers
    >
    > Ollie
    >
    > "Willy Denoyette [MVP]" <> wrote in message
    > news:...
    > > Try first to use it from a console program.
    > >
    > > Willy.
    > >
    > > <ooo> wrote in message news:...
    > > > I have a class that has the COM+ attributes to make it an object pool

    > and
    > > > transactional, I have strong-named the DLL and all the DLL's that it

    > uses.
    > > >
    > > > I have used regsvcs.exe to register it in the COM+ catalog, I can see

    it
    > > in
    > > > the catalog but.....
    > > >
    > > > When I use it from a web service I get the following error when

    > attempting
    > > > to create the object in the web service
    > > >
    > > > 'The ServicedComponent being invoked is not correctly configured (Use
    > > > RegSvcs to re-register).'
    > > >
    > > > I am using framework 1.1 with Windows 2000 Server SP3
    > > >
    > > > Any Ideas?
    > > >
    > > > Cheers
    > > >
    > > > Ollie
    > > >
    > > >

    > >
    > >

    >
    >
    Willy Denoyette [MVP], Dec 1, 2003
    #10
  11. Guest

    Guest Guest

    thanks willy,

    Got it working in the asp.net app, I used set the following attribute
    [assembly: ApplicationAccessControl(false)] for the security options, I
    presume this allows anonymous access to the COM+ component, Which is the
    best to secure access to the COM+ component?

    Cheers

    Ollie



    "Willy Denoyette [MVP]" <> wrote in message
    news:%...
    > Forget about this for a moment and return to your asp.net page and try to
    > run this in aspcomp mode.
    >
    > Willy.
    >
    > <ooo> wrote in message news:%...
    > > cheers willy, I am trying it in a coneoloe app now and it works....
    > >
    > > But where would I put application config values that I normally put the

    in
    > > the application.config file for a COM+ component?
    > >
    > > I have tried putting them in the xml config fiel for my test harness but

    > it
    > > is not reading the values ?
    > >
    > > Any one have any ideas?
    > >
    > > Cheers
    > >
    > > Ollie
    > >
    > > "Willy Denoyette [MVP]" <> wrote in message
    > > news:...
    > > > Try first to use it from a console program.
    > > >
    > > > Willy.
    > > >
    > > > <ooo> wrote in message news:...
    > > > > I have a class that has the COM+ attributes to make it an object

    pool
    > > and
    > > > > transactional, I have strong-named the DLL and all the DLL's that it

    > > uses.
    > > > >
    > > > > I have used regsvcs.exe to register it in the COM+ catalog, I can

    see
    > it
    > > > in
    > > > > the catalog but.....
    > > > >
    > > > > When I use it from a web service I get the following error when

    > > attempting
    > > > > to create the object in the web service
    > > > >
    > > > > 'The ServicedComponent being invoked is not correctly configured

    (Use
    > > > > RegSvcs to re-register).'
    > > > >
    > > > > I am using framework 1.1 with Windows 2000 Server SP3
    > > > >
    > > > > Any Ideas?
    > > > >
    > > > > Cheers
    > > > >
    > > > > Ollie
    > > > >
    > > > >
    > > >
    > > >

    > >
    > >

    >
    >
    Guest, Dec 2, 2003
    #11
  12. ooo wrote:

    > yes all the DLL it uses are in the GAC, does it have to be in the GAC as
    > well?


    Yes, the serviced DLL should be in the GAC as well. Or at least a copy
    of it should be in the website's bin\ directory. How else would it find it?
    General Protection Fault, Dec 2, 2003
    #12
    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. Id0x
    Replies:
    4
    Views:
    1,163
    Erik Max Francis
    Jul 21, 2003
  2. JohnE

    newbie with newbie questions

    JohnE, Aug 17, 2009, in forum: ASP .Net
    Replies:
    3
    Views:
    478
    Gregory A. Beamer
    Aug 17, 2009
  3. Jerry C.
    Replies:
    8
    Views:
    200
    Uri Guttman
    Nov 23, 2003
  4. Kruno Saho
    Replies:
    0
    Views:
    120
    Kruno Saho
    Apr 7, 2013
  5. Dave Angel
    Replies:
    0
    Views:
    105
    Dave Angel
    Apr 7, 2013
Loading...

Share This Page