Results 1 to 5 of 5

Thread: COM+ Remote Computer

  1. #1

    Thread Starter
    Frenzied Member blindlizard's Avatar
    Join Date
    Feb 2001
    Location
    Austin, TX - United States of America
    Posts
    1,141

    Thumbs up COM+ Remote Computer

    I have some COM+ compents that run fine on a single machine. How do I move them to a second machine, but continue to call them from the first? A true 3 tier application.
    I drink to make other people more interesting!
    [vbcode]On Error GoTo Bar[/vbcode]
    http://www.monsterlizard.com

  2. #2
    Member
    Join Date
    May 1999
    Location
    St. Louis, MO, USA
    Posts
    54
    Well I'm by no means the expert on this but I did this exact thing yesterday and it worked fine. The remote computer was on our network so when I made the dll I jut told it to make the dll on the remote machine.
    jen

  3. #3
    pvb
    Guest
    hmmm...so let's say you make your dll on your local machine. What really happens? in a nutshell it puts a key in the registry telling the com services where to find your dll. So build a component dll locally and go look for the progid in the registry. Under the inprocserver32 key you will notice the local path to your dll. Ok, now unregister the component, rebuild but this time go to a different machine on the network. go look for that progid in the registry, what we find under the inprocserver32 key is just a UNC path to the dll file on a different machine but that dll is still registered locally and only locally. My point? this has absolutely nothing to do with a COM+ distributed application and simply does nothing except make that other machine required to be available in order for you to use your component locally and only on your local machine.

    Ok, now back to the COM+ question. The easiest way I've found is to install the components on the tier/machine that will act as the app server. Next right click on the Application name and select Export. You have two choices, pick the one labeled "Application Proxy ... Install on other machines, etc...". You'll also need to provide the path and file name(with extension .msi) to the place where you want the distribution files to go. Click on next and the wizard will build two files at the specified location, one is the .MSI file the other is a .CAB file. Move those files to the client machine(s), double click the .MSI file, the installer will do the dirty work and install your component references pointing to the server.

    Now in your client apps you can just set a reference to the server app and that's it. Interesting to note, after running the .MSI file, under Program Files\ComPlus Applications a new folder(with a name of a GUID) is created containing your dll's. No entries for your components are made in the registry. The name of the folder is a GUID and the GUID is the one found in the registry on the server pointing to your the server dll.

  4. #4
    Member
    Join Date
    May 1999
    Location
    St. Louis, MO, USA
    Posts
    54

    Let me try verify I understand what you are saying. I make a dll on my local machine. Then I make the same dll on a remote machine on our network. Next I reference the dll in several spreadsheets, apps................. Now, are you saying the spreadsheets, apps............will only work while my local machine is running on the network?

    Com+ ?. I'm not sure what you mean by right click on the application name and select export. What is the application? Is it the dll I've created, the vb project, the spreadsheet or something else? Also, where I right click the application name at? The nt explorer vb tree..... I've been clicking on various things and cannot find export.

    Help is greatly appreciated
    jen

  5. #5
    pvb
    Guest
    COM+ consists of "Applications"(formally known as Packages in MTS). Applications consist of components, those public classes in your dll's. Once you create an application and add your comonents you have the option to export it. That looks like this:



    follow the wizard which really has one screen that looks like this:



    On this screen you would select Application Proxy...etc.. Click on Next and the wizard will generate two files, one with the .MSI file extension(this is the one to execute on the client which kicks off the Windows Installer) and the other is a .CAB support file.

    Back to the question on making a dll on a network machine versus local.
    . I make a dll on my local machine. Then I make the same dll on a remote machine on our network. Next I reference the dll in several spreadsheets, apps................. Now, are you saying the spreadsheets, apps............will only work while my local machine is running on the network?
    When you build your dll in VB you also register the dll. What that means is that a registry key is placed in the reg that supplies the COM runtime with necessary info for your component. Once thing is where to find your dll. The following is what the registry key looks like after building a component on a remote machine:



    Now if i were to build that locally, another key will be placed(i have project compatibility set) and it will have all new GUIDs and have a key pointing to the local path of the dll that i just built. Now if you were to build an application that references your dll when you pick your reference you will see a choice similar to the following:



    Notice there are two entries. One as you can see has a network path to a machine the other is the local copy. If you pick the dll reference on the networked machine as the component your app uses, then as i said previously, that network machine must be up and running in order for your application to function correctly.

    So the point here is that COM+ is a hosting environment for ActiveX DLL's(aka COM Components) and provides many extra features not available to standalone COM dll's such as Queued Components, Clustering, Load Balancing, and much more.

    Here is a good resource on COM+ from the Microsoft site:
    http://www.microsoft.com/com/tech/COMPlus.asp

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width