1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Changing ApplicationName Programmatically

Changing ApplicationName Programmatically

2 posts, 0 answered
  1. Richardsonke
    Richardsonke avatar
    10 posts
    Registered:
    10 Jul 2007
    06 Oct 2009
    Link to this post
    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:

    RoleManager
    Membership
    Profile
    SiteMap
    Notifications
    Search
    Localization
    Lists
    Forums
    RSS
    Versioning
    Security
    CMS
    cmsEngine (all of them)
    Workflow
    Polls
    FileManager
    Personalization
    SpamProtector

    Are there any of these that don't actually have to be set?  Thanks in advance for any help you can provide.

    -Keith
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    08 Oct 2009
    Link to this post
    Hi Richardsonke,

    Please take a look at the following articles which explains how to change the web.config file programmatically.

    Programmatically manipulating web.config in ASP.NET 2.0 and ASP.NET 3.5
    Programming the web.config File Using C#
    Edit Web.config programatically

    We do not expose methods that allow you to change the application name directly through the API - for instance from a control.

    All the best,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
2 posts, 0 answered