<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Sitecore Xperiences &#187; LDAP</title>
	<atom:link href="https://blog.peplau.com.br/category/sitecore-modules/ldap/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.peplau.com.br</link>
	<description>The things I&#039;ve seen as a Sitecore Professional</description>
	<lastBuildDate>Sun, 09 Mar 2025 21:54:22 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.1.41</generator>
	<item>
		<title>Best way to setup Active Directory Module in a Sitecore Solution</title>
		<link>https://blog.peplau.com.br/best-way-to-setup-active-directory-module-in-a-sitecore-solution/</link>
		<comments>https://blog.peplau.com.br/best-way-to-setup-active-directory-module-in-a-sitecore-solution/#comments</comments>
		<pubDate>Mon, 23 Mar 2015 22:37:40 +0000</pubDate>
		<dc:creator><![CDATA[Rodrigo Peplau]]></dc:creator>
				<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[LDAP]]></category>
		<category><![CDATA[Sitecore Modules]]></category>

		<guid isPermaLink="false">http://blog.peplau.com.br/?p=157</guid>
		<description><![CDATA[<div class="lr_horizontal_share" data-share-url="https://blog.peplau.com.br/best-way-to-setup-active-directory-module-in-a-sitecore-solution/"></div>Connecting Sitecore with an LDAP Server is pretty easy with Sitecore&#8217;s Active Directory Module. Setting up the module is not hard, but if you follow the official documentation you&#8217;ll end up updating a lot of your Web.config file, which may be a problem for several reasons: You can easily lose track on your customizations; Upgrading Sitecore for a newer version may become [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Connecting Sitecore with an LDAP Server is pretty easy with Sitecore&#8217;s <a href="http://sdn.sitecore.net/Products/AD.aspx" target="_blank">Active Directory Module</a>. Setting up the module is not hard, but if you follow <a href="http://sdn.sitecore.net/Products/AD/AD12/Documentation.aspx" target="_blank">the official documentation</a> you&#8217;ll end up updating a lot of your Web.config file, which may be a problem for several reasons:</p>
<ol>
<li>You can easily lose track on your customizations;</li>
<li>Upgrading Sitecore for a newer version may become harder;</li>
<li>During development you may be forced to turn your LDAP module off, basically undoing the setup of your providers, which is not straight-forward.</li>
</ol>
<p>After facing these issues a couple times I decided to look for a better approach.</p>
<p><strong>Using Includes</strong></p>
<p>Biggest limitation is by far the need to update your Web.config, as the changes are not in the Sitecore portion and thus cannot be automatically patched by files in your <em>/App_Config/Include</em> folder. Best you can do is to create patches with the configurations, then include them at the Web.config.</p>
<p><strong>Step by step</strong></p>
<ol>
<li>Add the LDAP connection settings to your ConnectionStrings.config:<br />
<blockquote><p>&lt;add name=&#8221;ManagersConnString&#8221; connectionString=&#8221;LDAP://yourldapserver.com:389/DC=your,DC=domain&#8221; /&gt;</p></blockquote>
</li>
<li>At your Web.config, find your <em>&lt;system.web&gt;</em> section and comment out your <em>&lt;membership&gt;</em>, <em>&lt;roleManager&gt;</em> and <em>&lt;profile&gt;</em> nodes &#8211; these will be all replaced by includes;</li>
<li>At the same level you commented out, add a &lt;machineKey&gt; node as covered at the official documentation:<br />
<blockquote><p>  &lt;machineKey validationKey=&#8221;BDDFE367CD36AAA81E195761BEFB073839549FF7B8E34E42C0DEA4600851B0065856B211719ADEFC76F3F3A556BC61A5FC8C9F28F958CB1D3BD8EF9518143DB6&#8243; decryptionKey=&#8221;0DAC68D020B8193DF0FCEE1BAF7A07B4B0D40DCD3E5BA90D&#8221; validation=&#8221;SHA1&#8243; /&gt;</p></blockquote>
</li>
<li>Still at this level let&#8217;s add three includes for Membership, RoleManager and Profile providers:<br />
<blockquote><p>&lt;!&#8211; Includes &#8211;&gt;<br />
&lt;membership configSource=&#8221;App_Config\AD\Membership.config&#8221; /&gt;<br />
&lt;roleManager configSource=&#8221;App_Config\AD\RoleManager.config&#8221; /&gt;<br />
&lt;profile configSource=&#8221;App_Config\AD\Profile.config&#8221; /&gt;</p></blockquote>
</li>
<li>As well as the three includes for disabling the module. We let it commented for now, which makes the module enabled:<br />
<blockquote><p>&lt;!&#8211;<br />
&lt;membership configSource=&#8221;App_Config\AD\Membership_Disabled.config&#8221; /&gt;<br />
&lt;roleManager configSource=&#8221;App_Config\AD\RoleManager_Disabled.config&#8221; /&gt;<br />
&lt;profile configSource=&#8221;App_Config\AD\Profile_Disabled.config&#8221; /&gt;<br />
&#8211;&gt;</p></blockquote>
</li>
<li>You have also to add your mapped domain(s) to <em>App_Config\Security\Domains.config</em>:<br />
<blockquote><p>&lt;domain name=&#8221;ad&#8221; ensureAnonymousUser=&#8221;false&#8221;/&gt;</p></blockquote>
</li>
<li>Now create a folder called &#8220;AD&#8221; at App_Config and drop the six config files that are zipped at this link:<br />
&#8211; <a href="http://blog.peplau.com.br/wp-content/uploads/AD-configs.rar">AD-configs</a> &#8211; Don&#8217;t forget to review all files (except the &#8220;_Disabled.config&#8221; that stores the native Sitecore configurations) to make sure you username, password and domains are corretly set!</li>
</ol>
<p>Now when you want to turn the module off you just have to comment out the lines from #4 and uncomment #5 &#8211; pretty easy.</p>
]]></content:encoded>
			<wfw:commentRss>https://blog.peplau.com.br/best-way-to-setup-active-directory-module-in-a-sitecore-solution/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
