Web Connection
2 Installs of same web Connect app
Gravatar is a globally recognized avatar based on your email address. 2 Installs of same web Connect app
  Alec Gagne
  Feb 27, 2019 @ 02:30pm

I have a WebConnect application "myapp.exe" which runs in \myapp\deploy and connects a database "A" running on a server.

Now on that same server I want to have a second separate instance of that app installed in \myapp2 where it is configured to connect to database "B". I setup the "myapp" virtual environment in IIS by running the exe from the windows command line with the "CONFIG" parameter. Example: \myapp\myapp CONFIG

What would be the best practice/method for configuring my 2nd copy of the same exe which will run in a different physical path location? I suspect I need a different VIRTUAL that is mapped to \myapp2\web. Is it as simple as selecting the "Default Web Site" and adding an application, setting the Alias to "myapp2" and the physical path to \myapp2\web ? That seems to get the job done, but I wonder if I'm missing something....

Gravatar is a globally recognized avatar based on your email address. re: 2 Installs of same web Connect app
  Rick Strahl
  Alec Gagne
  Feb 27, 2019 @ 04:18pm

You can easily set up an application twice in two locations but there are a few caveats you have to watch out for.

First the configuration that is created for the project in the YourApp_serverConfig.prg and the YourApp.ini settings need to be adjusted to account for the new virtual. Basically make sure to change the Virtual in the ini:


The second issue is that if you have the same app running in multiple virtuals you'll end up running two sets of COM instances with the same COM servers. This is not really a problem as the servers are properly isolated from each other but there are a few edge cases where server management may end up performing tasks on the entire sets of servers (like releasing servers by force if a 'regular' COM release doesn't work).

If that becomes a problem it might be a good idea to create a second project that basically is the same as the first but has:

  • A different Server Class Name (ie. MyApp2Server as opposed to MyAppServer)
  • A different EXE name (MyApp2.exe instead of MyApp.Exe)
  • If you do make sure to generate new COM Class IDs for the new project

It's not a requirement but it makes the process more obvious.

+++ Rick ---

© 1996-2019