You cannot shut down an individual object per se, but you can shut
down the process it lives in, aka the COM+ Server Application. There
is no need to restart it, unless the COM+ application is marked as
Queued, in which case just add the following after the
"ShutdownApplication" line to the script below:
oCatalog.StartApplication "YourCOM+AppName" 'case sensitive
Make a text file called, say, shutdown.vbs
----------------------------------------------------------------------------------------------------
dim oCatalog
set oCatalog= CreateObject("COMAdmin.COMAdminCatalog")
oCatalog.ShutdownApplication "YourCOM+AppName" 'case sensitive
set oCatalog= nothing
----------------------------------------------------------------------------------------------------
Then from command line run:
wscript shutdown.vbs
Regards,
Slava Gurevich
This comes up for me because apparently no one has an answer for my post
"COM+ Hosed with Concurrent Calls to Crystal?" and I can't be around all the
time to shutdown COM+ when it happens.
Thanks.
"Slava Gurevich" <vy...@hotmail.com> wrote in message
news:5tpfmv0eos40l79vo...@4ax.com...
You should be able to just integrate the code directly into your ASP
script.
As to the issue with Crystal reports, I am not an expert in Crystal
reports, but in my opinion it's not a good idea to use that with COM+
in the first place. Crystal reports component could pop modal dialog
boxes to the invisible desktop in COM+ with no one there to dismiss it
thereby causing what looks like a hang.
Is it possible that the Crystal component is trying to display a
dialog complaining of insufficient concurrent licenses? Have you
checked the Event Log to see if anything related is logged there?
Just for debugging you could try and set the COM+ App. identity to
"interactive user" while being logged on interactively, and see if any
Crystal GUI dialogs pop up under load test.
Perhaps you should also try posting to microsoft.public.vb.crystal to
see if you could get another opinion or more info about this.
Regards,
Slava Gurevich
On Wed, 17 Sep 2003 07:45:17 -0500, "Don Miller" <nos...@nospam.com>
wrote:
> Crystal reports component could pop modal dialog
> boxes to the invisible desktop in COM+ with no one there to dismiss it
> thereby causing what looks like a hang.
There's an option in the coding that prevents dialogs from popping up (but
maybe not error messages?). But would that trash the COM+ application so
that every Server.CreateObject("fooComponent") fails?
I've used the Crystal Report for 3 years without problem, just for the first
time the other day, two people used it at once :( I'm lucky though, at
least I've recreated the problem on my dev server. Just no clues yet.
> Is it possible that the Crystal component is trying to display a
> dialog complaining of insufficient concurrent licenses?
Good thought. I have a license (developer) for 5 concurrent accesses and I
can recreate the problem with under 5 accesses. I'll have to look into this
but my error trapping has always reported Crystal errors before (e.g.
"Server not opened", "Report File in use", etc.). I don't know where else
license issues would appear.
> Have you
> checked the Event Log to see if anything related is logged there?
Nothing. No cautions or warnings.
> Just for debugging you could try and set the COM+ App. identity to
> "interactive user" while being logged on interactively, and see if any
> Crystal GUI dialogs pop up under load test.
My dev machine is interactive, prod of course is not.
> Perhaps you should also try posting to microsoft.public.vb.crystal to
> see if you could get another opinion or more info about this.
Didn't know there was one. Thanks.
> You should be able to just integrate the code directly into your ASP
> script.
Shutting down a running COM+ app requires admin rights or membership in one
of the groups in the System Application, so my guess is that if he's running
under IUSR_* that will fail. Well, it *should* fail =)
The few times I've needed to do this I've done it from another COM+ app
running under an identity configured with said permissions, then called from
an ASP page.
--
____________
Klaus
Slava Gurevich