Skip to content

Instantly share code, notes, and snippets.

@Wesley-Lomax
Created October 15, 2018 14:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Wesley-Lomax/0713761859c3befc39239236ddf6e16f to your computer and use it in GitHub Desktop.
Save Wesley-Lomax/0713761859c3befc39239236ddf6e16f to your computer and use it in GitHub Desktop.
Web.CD.config Transform CM config to CD for Sitecore 9
<?xml version="1.0" encoding="utf-8"?>
<!--
NOTE : Using this xdt file sets up the web.config for CD servers,
regular web.config file is set up for CM servers.
Applying transform through VSTS using XDT Tranform task before CD App Service install
-->
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<location path="sitecore/api" xdt:Transform="InsertBefore(/configuration/system.web)">
<system.web>
<authorization>
<allow users="*"/>
</authorization>
</system.web>
</location>
<location path="sitecore/service" xdt:Transform="InsertBefore(/configuration/system.web)">
<system.web>
<authorization>
<allow users="*"/>
</authorization>
</system.web>
</location>
<system.web>
<authentication mode="None" xdt:Transform="Replace">
<forms name=".ASPXAUTH" cookieless="UseCookies"/>
</authentication>
<sessionState mode="Custom" cookieless="false" timeout="20" sessionIDManagerType="Sitecore.SessionManagement.ConditionalSessionIdManager" customProvider="redis" xdt:Transform="Replace">
<providers>
<add name="mongo" type="Sitecore.SessionProvider.MongoDB.MongoSessionStateProvider, Sitecore.SessionProvider.MongoDB" sessionType="Standard" connectionStringName="session" pollingInterval="2" compression="true" />
<add name="mssql" type="Sitecore.SessionProvider.Sql.SqlSessionStateProvider, Sitecore.SessionProvider.Sql" sessionType="Standard" connectionStringName="session" pollingInterval="2" compression="true" />
<add name="redis" type="Sitecore.SessionProvider.Redis.RedisSessionStateProvider, Sitecore.SessionProvider.Redis" applicationName="private" connectionString="redis.sessions" pollingInterval="2" />
</providers>
</sessionState>
</system.web>
<system.webServer>
<modules>
<add type="Sitecore.Analytics.RobotDetection.Media.MediaRequestSessionModule, Sitecore.Analytics.RobotDetection" name="MediaRequestSessionModule" xdt:Locator="Match(name)" xdt:Transform="SetAttributes" />
</modules>
<handlers>
<add name="Telerik_Web_UI_DialogHandler_aspx" xdt:Transform="Remove" xdt:Locator="Match(name)" />
<add name="Telerik_Web_UI_SpellCheckHandler_axd" xdt:Transform="Remove" xdt:Locator="Match(name)" />
<add name="Telerik_Web_UI_WebResource_axd" xdt:Transform="Remove" xdt:Locator="Match(name)" />
</handlers>
</system.webServer>
</configuration>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment