Valid for Sitecore
5.3, 5.2, 5.1.1
Is it possible to set up more Sitecore domains, i.e. "Internet public", "Intranet" besides "Sitecore" and "Extranet"?
Q:
Is it possible to set up more Sitecore domains, i.e. "Internet public", "Intranet" besides "Sitecore" and "Extranet"?
A:
It is possible to set up more Sitecore domains by cloning the 'Security' or the 'Extranet' database (the latter is more appropriate) and copying corresponding settings in Web.Config file. For example, you may copy 'Extranet' database to 'scIntranet' database and make the following changes to the Web.config file:
1. Add a Connection
<connections serverName="server" user="user" password="password" prefix="sc">
<archive>data source=$(serverName);initial catalog=$(prefix)Archive;user id=$(user);password=$(password);Connect Timeout=30</archive>
<core>data source=$(serverName);initial catalog=$(prefix)Core;user id=$(user);password=$(password);Connect Timeout=30</core>
<extranet>data source=$(serverName);initial catalog=$(prefix)Extranet;user id=$(user);password=$(password);Connect Timeout=30</extranet>
<master>data source=$(serverName);initial catalog=$(prefix)Master;user id=$(user);password=$(password);Connect Timeout=30</master>
<recyclebin>data source=$(serverName);initial catalog=$(prefix)RecycleBin;user id=$(user);password=$(password);Connect Timeout=30</recyclebin>
<security>data source=$(serverName);initial catalog=$(prefix)Security;user id=$(user);password=$(password);Connect Timeout=30</security>
<!-- ADD YOUR CUSTOM CONNECTION -->
<INTRANET>data source=$(serverName);initial catalog=$(prefix)Intranet;user id=$(user);password=$(password);Connect Timeout=30</INTRANET>
<!-- YOU MAY ADD AS MANY AS YOU WISH -->
</connections>
2. Add Database Objects
<databases>
...
<!-- extranet -->
<!-- THIS IS THE EXISTING ONE -->
<database id="extranet" singleInstance="true" type="Sitecore.Data.Database, Sitecore.Kernel">
<param desc="name">$(id)</param>
<dataProviders hint="list:AddDataProvider">
<dataProvider ref="dataProviders/templatefile" param1="/sitecore/shell/Security templates.xml"/>
<dataProvider ref="dataProviders/main" param1="$(id)"/>
</dataProviders>
<securityEnabled>false</securityEnabled>
<archives hint="list:AddArchive">
<archive path="archives/archive[@id='recyclebin']"/>
</archives>
</database>
<!-- YOU MAY ADD THE ONE BELOW -->
<!-- intranet -->
<database id="INTRANET" singleInstance="true" type="Sitecore.Data.Database, Sitecore.Kernel">
<param desc="name">$(id)</param>
<dataProviders hint="list:AddDataProvider">
<dataProvider ref="dataProviders/templatefile" param1="/sitecore/shell/Security templates.xml"/>
<dataProvider ref="dataProviders/main" param1="$(id)"/>
</dataProviders>
<securityEnabled>false</securityEnabled>
<archives hint="list:AddArchive">
<archive path="archives/archive[@id='recyclebin']"/>
</archives>
</database>
<!-- YOU MAY ADD AS MANY AS YOU WISH -->
</databases>
3. Add a Domain
<!-- DOMAINS -->
<!-- Custom domain classes must derive from Sitecore.SecurityModel.Domain -->
<domains>
<domain id="sitecore" singleInstance="true" type="Sitecore.SecurityModel.Domain, Sitecore.Kernel">
<param desc="name">$(id)</param>
<param desc="database">security</param>
<Appearance.ShortDescription>The main Sitecore domain</Appearance.ShortDescription>
</domain>
<domain id="extranet" singleInstance="true" type="Sitecore.SecurityModel.Domain, Sitecore.Kernel">
<param desc="name">$(id)</param>
<param desc="database">$(id)</param>
<param desc="connection" ref="connections/crm"/>
</domain>
<!-- ADD A NEW DOAMIN HERE -->
<domain id="INTRANET" singleInstance="true" type="Sitecore.SecurityModel.Domain, Sitecore.Kernel">
<param desc="name">$(id)</param>
<param desc="database">$(id)</param>
</domain>
</domains>