473,725 Members | 1,942 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to Stop Serviced Component so Uninstall removes it completely

We have several serviced components written in .NET 1.1. Using Visual
Studio, we have an installer project that creates an installer for them.

The components are installed properly into the GAC and show in the Component
Services control panel.

The issue is when we uninstall or want to upgrade the components. What we
have found is if there are live instances pooled and running (which is always
the case as we want them to be ready for calls by a web application), then if
we just uninstall or try an upgrade install, the component is not removed
from the Component Services list. After an upgrade we would then see two
versions registered, the old one and the new one where the old one won't of
course work because the files have been removed. This causes issues with the
calling web application which seems to get confused.

It's also confusing to look at at the least.

However, if we stop the component first by going to the Component services
control panel and right clicking Shutdown on it. Then when we do an
uninstall or an upgrade install, the old version is removed from the
Component Services list and the new one added and everything is fine.

So my question is....is there a way to put a custom action in the Visual
Studio installer so that during it's "before uninstall" function it can
shutdown the component so we don't have to do it manually.

I know how to tell the installer project to do something but I don't know
how you shutdown a component like this programatically .
Jul 29 '05 #1
3 5445
Hi Robert,
......
I know how to tell the installer project to do something but I don't
know how you shutdown a component like this programatically .


If you want to shut down and remove a component service programmaticall y,
you can use Component Services Administration (COMAdmin) objects to acheive
it, I suggest you manipulate the COMAdmin objects in a vbs file in order
you can call it in a custom action in your installer program.

For details of how to shut down and remove a component service in a vbs
file, please refer to the following MSDN article and related newsgroup
thread, which has a helpful sample on this issue:

Automating COM+ Administration
http://msdn.microsoft.com/library/de...us/cossdk/html
/f302eb02-2ef5-42ee-a18f-59f7e60b38df.as p

Update a COM+ DLL in Component Services on Win2K
http://groups-beta.google.com/group/...owse_thread/th
read/9cca0e35fa65669 5/27f2b46be706bea a?lnk=st&q=unin stall+%22compon ent+servi
ces%22+vbscript &rnum=1&hl=en#2 7f2b46be706beaa
Hope this helps!

Best regards,

Gary Chang
Microsoft Community Support
--------------------
Get Secure! ¡§C www.microsoft.com/security
Register to Access MSDN Managed Newsgroups!
http://support.microsoft.com/default...sdn/nospam.asp
&SD=msdn

This posting is provided "AS IS" with no warranties, and confers no rights.

Jul 30 '05 #2
Thanks, I was able to get this to work by overriding the OnBeforeUninsta ll
event in a custom installer in the project and adding the below:

' Instantiate a COMAdminCatalog object.
Dim objCatalog As COMAdminCatalog = CreateObject("C OMAdmin.COMAdmi nCatalog")

objCatalog.Shut downApplication ("Analyzer Control Publisher Application")

Works great.

Thanks.
R-

""Gary Chang[MSFT]"" wrote:
Hi Robert,
......
I know how to tell the installer project to do something but I don't
know how you shutdown a component like this programatically .


If you want to shut down and remove a component service programmaticall y,
you can use Component Services Administration (COMAdmin) objects to acheive
it, I suggest you manipulate the COMAdmin objects in a vbs file in order
you can call it in a custom action in your installer program.

For details of how to shut down and remove a component service in a vbs
file, please refer to the following MSDN article and related newsgroup
thread, which has a helpful sample on this issue:

Automating COM+ Administration
http://msdn.microsoft.com/library/de...us/cossdk/html
/f302eb02-2ef5-42ee-a18f-59f7e60b38df.as p

Update a COM+ DLL in Component Services on Win2K
http://groups-beta.google.com/group/...owse_thread/th
read/9cca0e35fa65669 5/27f2b46be706bea a?lnk=st&q=unin stall+%22compon ent+servi
ces%22+vbscript &rnum=1&hl=en#2 7f2b46be706beaa
Hope this helps!

Best regards,

Gary Chang
Microsoft Community Support
--------------------
Get Secure! ¡§C www.microsoft.com/security
Register to Access MSDN Managed Newsgroups!
http://support.microsoft.com/default...sdn/nospam.asp
&SD=msdn

This posting is provided "AS IS" with no warranties, and confers no rights.

Jul 30 '05 #3
OK, we are glad to help you on this issue:)

Good Luck!
Best regards,

Gary Chang
Microsoft Community Support
--------------------
Get Secure! ¡§C www.microsoft.com/security
Register to Access MSDN Managed Newsgroups!
http://support.microsoft.com/default...sdn/nospam.asp
&SD=msdn

This posting is provided "AS IS" with no warranties, and confers no rights.

Aug 2 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
2078
by: Stan | last post by:
Here is my scenario: Web server ------------ Framework 1.1 Application proxy for the serviced component Component server ------------------- Framework 1.0
2
1339
by: Ansari | last post by:
hi all, I want to use serviced component in ASP.NET any walkthrough or link to a resource. I have tried a lot but serviced component could be initialized in ASP.NET page. However I can successfully access the component in windows application. Is there some extra efforts required to use serviced components in ASP.NET? any suggesstion or link will be highly appreiciated....
0
1229
by: Mihiri | last post by:
Hi, I have created sample .Net Serviced Component and registered it with com+ services as a server application. (windows 2000). In my client application(vb.net) , Com+ objects are disposed using Dispose method. Even though I dispose memory usage of DLLhost.exe does not decrease. Both client and serviced component are on the same machine for the moment. When I configure com+ component as a library application it works fine. When a...
3
368
by: Robert | last post by:
We have several serviced components written in .NET 1.1. Using Visual Studio, we have an installer project that creates an installer for them. The components are installed properly into the GAC and show in the Component Services control panel. The issue is when we uninstall or want to upgrade the components. What we have found is if there are live instances pooled and running (which is always the case as we want them to be ready for...
0
1264
by: Mark Mims | last post by:
I am having a problem with a .NET serviced component running in MTS trying to call a web service on a remote machine on our internal network. The serviced component is using a domain account for authentication. When making the same call from a windows application it works successfully, but throught the serviced component I get this error, File or assembly name 5vb_bpv7.dll, or one of its dependencies, was not found. The ddl in the error...
4
1958
by: Pete Wittig | last post by:
Hello, I am creating an app using Serviced Components and I am exposing them using the Enterprise Services SOAP service. Here is my problem: I have one COM+ application with several serviced components. When I enable the SOAP service, I can access a WSDL link to every component in the application. What I would like to do is the following: Have a class A that is exposed through the SOAP service that provides getters for instances of...
0
1329
by: =?Utf-8?B?QkY=?= | last post by:
I am trying to work on Serviced Component in .NET 2.0 environment. I don't see much information about serviced component in .NET 2.0 environment. I worked on serviced component 2 years ago with .NET 1.1, which is not so easy to use. Can anybody tell me whether we have new features in .NET 2.0 to make serviced component easier to use? Thanks a lot.
2
4681
by: =?Utf-8?B?QkY=?= | last post by:
I am currently working on moving our business objects into COM+ serviced components. But in the process, there are too many changes such ComVisible and serviced component does not support parameterized constructors. So I am thinking whether I should change to use .NET remoting instead. Have anybody else gone through this .NET remoting vs serviced component comparison before? Which one is better? Can .NET remoting support object pooling...
0
5349
by: bharathreddy | last post by:
In .Net COM+ components are referred to as serviced components, Namespace: System.EnterpriseServices; Advantage of Serviced Components: object pooling, database connection pooling,
0
8752
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9401
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9257
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9174
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6702
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6011
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4517
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4782
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2157
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.