Posts

Showing posts from November, 2008

Shutting Down a Running COM+ Instance

Image
If you have an instance of object running under COM+ (in the dllhost.exe process space) and you want to shut it down from C#, you can use the code below.  Note that ShutdownApplication only intializes the shutdown of the COM+ applicance, it will return sometimes before the application is finished shuting down.  So you need to check to make sure the applicatio is shut down before continue.  I use this code in my unit testing to kill the instance-- making sure that it is stateless.  Also note that you need to send the package id for the application -- this is the guid you used when installing the application into COM+.  It can be found on the first property page of the application properties in component manager. internal static void ShutDown() { Int32 count = 0; COMAdmin.COMAdminCatalog objAdmin = new COMAdmin.COMAdminCatalog(); // WWB: ShutDown The Application (All Instances) Using teh Package Id objAdmin.ShutdownApplication(Configuration...

Mesh and IE Favorates

Image
I have been playing around with Mesh a bit of late. Mostly good other than on a few of my machines, Mesh refused to install. Either the install itself failed or it just never allowed me to sign in. But, I figured out one use for Mesh this morning that made it all come together: sharing IE Favorites. After installing Mesh, share the following folder on each machine: Xp, 2003: C:\Documents and Settings\%USERNAME%\Favorites\Links Vista, 2008: C:\Users\%USERNAME%\Favorites\Links Make sure when resolving the share location of the folder on subsiquent machines, you browse to the location above. Now your IE links are synced across machines.  

Vista Administrator

In Vista there is an Administrator account, however it is disabled on install. If you join the domain you can login with any domain user you want, however if your domain connection is lost, your computer account or the domain lost then you can only login with the local user you created at install -- which can't be the Administrator. If you forget the the password to this user there is a problem. So to prevent a reinstall you need to enable the Administrator account with this: Net user administrator /active:yes at the command line under elevated permissions (Run As Administrator). The administrator password is blank (which means you don't have to login) by default. {6230289B-5BEE-409e-932A-2F01FA407A92}