Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Component Services / December 2003

Tip: Looking for answers? Try searching our database.

COM+ C# newbie....

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
- 01 Dec 2003 13:39 GMT
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] - 01 Dec 2003 14:41 GMT
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.

Signature

              - Nicholas Paldino [.NET/C# MVP]

> 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.
[quoted text clipped - 15 lines]
>
> Ollie
- 01 Dec 2003 15:06 GMT
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
> Ollie,
>
[quoted text clipped - 28 lines]
> >
> > Ollie
Gawelek - 01 Dec 2003 15:00 GMT
>  .... all the DLL's that it uses.
Are they registered in GAC ?

Gawel
- 01 Dec 2003 15:14 GMT
yes all the DLL it uses are in the GAC, does it have to be in the GAC as
well?

Ollie

> >  .... all the DLL's that it uses.
> Are they registered in GAC ?
>
> Gawel
General Protection Fault - 02 Dec 2003 16:56 GMT
> 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?
Willy Denoyette [MVP] - 01 Dec 2003 16:08 GMT
Try first to use it from a console program.

> 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.
[quoted text clipped - 15 lines]
>
> Ollie
- 01 Dec 2003 18:24 GMT
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

> Try first to use it from a console program.
>
[quoted text clipped - 18 lines]
> >
> > Ollie
Nicholas Paldino [.NET/C# MVP] - 01 Dec 2003 19:08 GMT
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.

Signature

              - Nicholas Paldino [.NET/C# MVP]

> cheers willy, I am trying it in a coneoloe app now and it works....
>
[quoted text clipped - 35 lines]
> > >
> > > Ollie
- 01 Dec 2003 19:19 GMT
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

> Ollie,
>
[quoted text clipped - 51 lines]
> > > >
> > > > Ollie
Willy Denoyette [MVP] - 01 Dec 2003 20:05 GMT
Forget about this for a moment and return to your asp.net page and try to
run this in aspcomp mode.

> cheers willy, I am trying it in a coneoloe app now and it works....
>
[quoted text clipped - 35 lines]
> > >
> > > Ollie
- 02 Dec 2003 13:52 GMT
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

> Forget about this for a moment and return to your asp.net page and try to
> run this in aspcomp mode.
[quoted text clipped - 40 lines]
> > > >
> > > > Ollie

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.