473,756 Members | 3,663 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 5447
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
2079
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
1340
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
1231
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
1266
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
1960
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
1331
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
4686
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
5355
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
9872
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
9841
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,...
0
9711
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7244
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
5141
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
5303
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3805
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3358
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2666
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.