More in this section

Forums / Set-up & Installation / multiple subdomains, multiple dbs....

multiple subdomains, multiple dbs....

3 posts, 1 answered
  1. Gary
    Gary avatar
    17 posts
    22 Apr 2009
    09 Apr 2010
    Link to this post
    I've done some searching within the forums and seen several subdomain threads, including page group utilization, so I hope this question hasn't already been answered...

    Please correct me if I am mistaken, but even using the "routing" that is available to send visitors of a subdomain to a designated page, all of the pages would be sharing the same images, documents, forums, blogs, etc....  though content could be filtered to each subdomain by manipuating the controls on every page to filter on category(categories could be setup to mimic subdomain heirarchy).
    What I am thinking of doing is having one SF db for the root(www) which will have ALL membership(Admin & users) and content for www.    Each subdomain would have it's own SF db, but have it's membership provider(s) pointed at the root(www) domain.   My desired result is for each sub-domain to have it's own SiteFinity/Admin/ login page and content, though pulling all user information from the root(www) db.
    My Questions:
    1)   Does anyone have a thought as to a better way of accomplishing the goal?  Am I  on the right/wrong track?
    2)   Is it as simple as adding the connection string to the main DB to the web.config of each subdomain's SF instance?   Which "provider" settings should be changed to accomplish this within each subdomains web.config?
    Thank you for your time!
  2. Gary
    Gary avatar
    17 posts
    22 Apr 2009
    09 Apr 2010
    Link to this post
    Well, I answered #2 for myself... works as expected, just had to additionally add the connection within the telerik <dataaccess> area.   Still open to critical opinions in support of, or in difference to my approach.
  3. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    12 Sep 2017
    16 Apr 2010
    Link to this post
    Hello Gary,

    If you use a common membership provider for all website they will use the same users data. You should also have the same Profile and Role providers.

    • Set a connectionString to your database
    • Set Membership  and RoleProviders in the web.config.
    By design the Sitefinity backend supports only one Membership provider.

    All websites should have the same configuration settings

    Membership, Profile and Role providers

       <roleManager enabled="true" cacheRolesInCookie="true" defaultProvider="Sitefinity">
           <clear />
           <add connectionStringName="DefaultConnection" applicationName="/" name="Sitefinity" type="Telerik.DataAccess.AspnetProviders.TelerikRoleProvider, Telerik.DataAccess" />
       <membership defaultProvider="Sitefinity" userIsOnlineTimeWindow="15" hashAlgorithmType="">
           <clear />
           <add name="Sitefinity" connectionStringName="DefaultConnection" type="Telerik.DataAccess.AspnetProviders.TelerikMembershipProvider, Telerik.DataAccess" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" applicationName="/" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" passwordAttemptWindow="10" passwordStrengthRegularExpression="" minRequiredPasswordLength="1" minRequiredNonalphanumericCharacters="0" />
       <profile defaultProvider="Sitefinity">
           <clear />
           <add name="Sitefinity" connectionStringName="DefaultConnection" applicationName="/" type="Telerik.DataAccess.AspnetProviders.TelerikProfileProvider, Telerik.DataAccess" />
           <add name="FirstName" />
           <add name="LastName" />
           <add name="Position" />
           <add name="Photo_Hidden" />
           <add name="Photo" defaultValue="~/Sitefinity/Common/Images/defaultavatar.gif" />
           <group name="InstantMessenger">
             <add name="IM_Type" />
             <add name="IM_Value" />
           <group name="Phone">
             <add name="Value" />
             <add name="Type" />


    <dataAccess defaultConnection="DefaultConnection">
           <add name="DefaultConnection" driver="Telerik.DataAccess.Providers.ExtendedSqlServer2005Provider, Telerik.DataAccess" connectionStringName="Sitefinity" />
           <add name="GenericContentConnection" driver="Telerik.Cms.Engine.Data.Providers.GCSql2005Provider, Telerik.Cms.Engine.Data" connectionStringName="Sitefinity" />

    connection string for the providers should be the same

        <add name="Sitefinity" connectionString="data source=SERVER1\SQLEXPRESS;Integrated Security=SSPI;initial catalog=DEV" providerName="System.Data.SqlClient" />

    You can gather more detailed information about Membership, Role and Profile providers at MSDN

    Introduction to Membership
    Implementing a Role Provider
    Implementing a Profile Provider

    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Register for webinar
3 posts, 1 answered