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 / July 2004

Tip: Looking for answers? Try searching our database.

COM+ Application Administration

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Tres Henry - 08 Jul 2004 21:29 GMT
I need to change the identity (user name and password) that a COM+
application is running under on a remote machine.  Does anyone have an
example of remotely administering COM+ applications in .NET?

Thanks,

-Tres
Tomas Restrepo \(MVP\) - 09 Jul 2004 03:42 GMT
Tres,

> I need to change the identity (user name and password) that a COM+
> application is running under on a remote machine.  Does anyone have an
> example of remotely administering COM+ applications in .NET?

Do you really need to use .NET for this? Although you can certainly use COM
interop with ComAdmin.dll, It's just a simple 20- lines VBScript, which to
me, seems like a preferable choice for quick tasks like this ;)

Here's a short sample:

Dim appID
appID = "<Guid of the Application>"

Dim catalog, root
set catalog = CreateObject("COMAdmin.COMAdminCatalog")
set root = catalog.Connect("<server name or localhost>")

Dim appsCol
set appsCol = catalog.GetCollection("Applications")
appsCol.PopulateByKey Array(appID)

for each obj in appsCol
  obj.Value("Identity") = "<domain and user name>"
  obj.Value("Password") = "<password>"
next

appsCol.SaveChanges

Signature

Tomas Restrepo
tomasr@mvps.org

Tres Henry - 09 Jul 2004 19:14 GMT
Tomas Restrepo (MVP) wrote:
> Tres,
>
[quoted text clipped - 5 lines]
> interop with ComAdmin.dll, It's just a simple 20- lines VBScript, which to
> me, seems like a preferable choice for quick tasks like this ;)

Yeah, I ended up using comadmin.dll through interop.  I would have done
it this way to begin with but I didn't realize that COMAdminCatalogClass
has a Connect() method that allows you to configure remote applications.
  Still, shouldn't this be doable through WMI?  I can't believe there
isn't a Win32_COMPlusApplication class or something like that.

Thanks for your help though!
Klaus H. Probst - 09 Jul 2004 19:22 GMT
I don't see why you'd need to complicate something that is complicated
enough by adding it to WMI.

The admin interfaces are hard to figure out but they work fine as they are,
and as you said, work perfectly well in remote mode.

Signature

Klaus H. Probst, MVP
  http://www.vbbox.com/

> Tomas Restrepo (MVP) wrote:
> > Tres,
[quoted text clipped - 14 lines]
>
> Thanks for your help though!

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.