COM+ C# newbie....

G

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
 
N

Nicholas Paldino [.NET/C# MVP]

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.
 
G

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 said:
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]
- (e-mail address removed)

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
 
G

Guest

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

Ollie
 
G

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
 
N

Nicholas Paldino [.NET/C# MVP]

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.
 
G

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 said:
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]
- (e-mail address removed)

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

pool
and
see
 
W

Willy Denoyette [MVP]

Forget about this for a moment and return to your asp.net page and try to
run this in aspcomp mode.

Willy.
 
G

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
 
G

General Protection Fault

ooo said:
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?
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top