I'm working on a project where will will have multiple instances of Sitefinity all running off the same database. Each Sitefinity instance will have its own virtual directory in the same site. I have gotten this working by setting the ApplicationName differently for each instance, but I'd like to do this programmatically. In order to make upgrading easier, I'd like each virtual directly look at the exact same code, including the same web.config. Then in Application_Start or Page_Init or something similar, I'd set the ApplicationName for all of the providers based on the url that the web user is going to. How can I change these settings programmatically for all of the following:
cmsEngine (all of them)
Are there any of these that don't actually have to be set? Thanks in advance for any help you can provide.