<?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; Sitecore Modules</title>
	<atom:link href="http://blog.peplau.com.br/category/sitecore-modules/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.peplau.com.br</link>
	<description>The things I&#039;ve seen as a Sitecore Professional</description>
	<lastBuildDate>Sun, 13 Feb 2022 16:58:23 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.1.34</generator>
	<item>
		<title>Sitecore 10.1 Form Send E-mail VS Community Send E-mail</title>
		<link>http://blog.peplau.com.br/sitecore-10-1-form-send-e-mail-vs-community-send-e-mail/</link>
		<comments>http://blog.peplau.com.br/sitecore-10-1-form-send-e-mail-vs-community-send-e-mail/#comments</comments>
		<pubDate>Tue, 30 Mar 2021 20:07:32 +0000</pubDate>
		<dc:creator><![CDATA[Rodrigo Peplau]]></dc:creator>
				<category><![CDATA[Experience Forms]]></category>
		<category><![CDATA[Sitecore Community]]></category>
		<category><![CDATA[Sitecore Modules]]></category>

		<guid isPermaLink="false">http://blog.peplau.com.br/?p=846</guid>
		<description><![CDATA[<div class="lr_horizontal_share" data-share-url="http://blog.peplau.com.br/sitecore-10-1-form-send-e-mail-vs-community-send-e-mail/"></div>Experience Forms debuted in 2017 with the Initial Release of Sitecore 9.0. With the mission to replace &#8220;Webforms For Marketers&#8221; (WFFM), it started pretty small. Lots of features were not available in the beginning, some of them taking several years to arise. To be precise, part of the community still thinks it has a long [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Experience Forms debuted in 2017 with the Initial Release of Sitecore 9.0. With the mission to replace &#8220;Webforms For Marketers&#8221; (WFFM), it started pretty small. Lots of features were not available in the beginning, some of them taking several years to arise.</p>
<p>To be precise, <a href="https://twitter.com/jammykam/status/1370023523742326784" target="_blank">part of the community still thinks it has a long road to catch up with WFFM</a>…</p>
<p><img class=" aligncenter" src="http://gif.co/xxyg.gif" alt="" width="543" height="434" /></p>
<h2>Sending Email Messages with Experience Forms</h2>
<p>One of the biggest gaps was the “Send Email Message” action, not present until very recently in Sitecore 10.1. For more than 3 years, the only supported way was the EXM integration, <a href="https://joaoneto.blog/tutorial-send-email-based-on-field-value-using-exm-forms-and-marketing-automation" target="_blank">as my friend João Neto explains in this post</a>.</p>
<p>Noticed the gap, <a href="https://www.nishtechinc.com/Blog/2018/April/Send-E-mail-Action-to-Sitecore-9-Forms" target="_blank">I implemented a free module to provide the community with this feature</a>. Until these days, this is still my most popular module.</p>
<p>But what are the similarities and differences between the two actions? Today, I take a deep dive into the new feature and compare it with my community module.</p>
<p>&nbsp;</p>
<h2>Installation and Configuration</h2>
<p>The new official action comes out-of-the-box. This is convenient compared to external modules: no packages to install. An advantage to Sitecore!</p>
<p>In both cases, you&#8217;ll need to fill the SMTP settings with a configuration patch file. You can use <a href="https://bitbucket.org/nishtechinc/formssendmail/src/master/FormsSendMail/App_Config/Include/smtp.config" target="_blank">the same patch from my module</a>, with localhost settings – Counterstrike!</p>
<p>&nbsp;</p>
<h2>User Interface</h2>
<p>The new action has a nice GUI to configure the action, enabling content editors to write messages in a nice way.</p>
<p><a href="http://blog.peplau.com.br/wp-content/uploads/01-New-UI.png"><img class="alignnone size-full wp-image-848" src="http://blog.peplau.com.br/wp-content/uploads/01-New-UI.png" alt="01 - New UI" width="955" height="478" /></a></p>
<p>I have to admit, this is much better than having to edit e-mail the templates beforehand.</p>
<p><a href="http://blog.peplau.com.br/wp-content/uploads/02-Old-Module-UI.png"><img class="alignnone wp-image-849" src="http://blog.peplau.com.br/wp-content/uploads/02-Old-Module-UI-1024x509.png" alt="02 - Old Module UI" width="1024" height="509" /></a></p>
<p>&nbsp;</p>
<p>The new GUI also provides token selection, so now you don&#8217;t have to remember the exact field names.</p>
<p><a href="http://blog.peplau.com.br/wp-content/uploads/03-Token-selection.png"><img class="alignnone size-full wp-image-850" src="http://blog.peplau.com.br/wp-content/uploads/03-Token-selection.png" alt="03 - Token selection" width="335" height="282" /></a></p>
<p>Well, well… looks like the team in charge of this implementation worked very hard!  <img src="http://blog.peplau.com.br/wp-includes/images/smilies/icon_smile.gif" alt=":-)" class="wp-smiley" /></p>
<p>&nbsp;</p>
<h2>Keyword replacement with Form Data</h2>
<p>Both actions use the same strategy for data replacement, with field named tokens that are replaced with the respective form data. Sitecore uses the [fieldname] format, while the community uses {fieldname}, which is practically the same.</p>
<p>But again, when it comes to the new GUI and the ability to visually select your tokens from the form fields, the new action is much superior for content editors.</p>
<h3>Keyword replacement oddities</h3>
<p>There are still some oddities with keyword replacement, that could be easy fixes. Who knows if Sitecore will ever get back to this simple, but very important feature? They should.</p>
<h4>No replacement allowed with e-mail fields</h4>
<p>It feels strange that none of the e-mail fields (To, Cc, Bcc, and From) can use token replacement. This makes it impossible to send messages using addresses collected in a form.</p>
<p><a href="http://blog.peplau.com.br/wp-content/uploads/04-Email-fields.png"><img class="alignnone size-full wp-image-851" src="http://blog.peplau.com.br/wp-content/uploads/04-Email-fields.png" alt="04 - Email fields" width="901" height="181" /></a></p>
<p>The “From” field is even more limited, as it does not allow to type e-mail addresses. Instead, the editor should select the submitter in a dropdown. To add new submitters to the list, you have to create new items under the following path:</p>
<blockquote><p>/sitecore/system/Settings/Forms/Meta Data/Address Book/Senders</p></blockquote>
<p>This is a serious limitation: the community module allows tokens in any field. This feature is crucial when you want to send emails to (and from) addresses collected in the form. You can&#8217;t send a message to the submitted address, or to the right department as selected in a dropdown field.</p>
<h4>Defective replacement with the Subject field</h4>
<p>Testing the new action, my first submission failed without any visual feedback. The log file showed this curious message:</p>
<blockquote><p>ERROR [Experience Forms]: The specified string is not in the form required for a subject.</p></blockquote>
<p>This started to make more sense when you look at the way I configured the subject:<a href="http://blog.peplau.com.br/wp-content/uploads/05-Subject-setup.png"><img class="alignnone size-full wp-image-852" src="http://blog.peplau.com.br/wp-content/uploads/05-Subject-setup.png" alt="05 - Subject setup" width="246" height="64" /></a></p>
<p>And the content of the &#8220;Multi” field when I submitted this form:</p>
<p><a href="http://blog.peplau.com.br/wp-content/uploads/06-Subject-in-a-MultiList-field.png"><img class="alignnone size-full wp-image-853" src="http://blog.peplau.com.br/wp-content/uploads/06-Subject-in-a-MultiList-field.png" alt="06 - Subject in a MultiList field" width="229" height="94" /></a></p>
<p>It worked fine when I removed the line breaks, so this bug is due to them. This would be an easy fix for future releases. Keep this in mind when you use tokens in the subject, and you will save some precious debugging time!</p>
<p>&nbsp;</p>
<h2>Compatibility</h2>
<p>The new action is only available from Sitecore 10.1 and higher. The community module is still the easiest way to submit e-mails from 9.0 to 10.0, which ensures its relevancy. At least until most of the Sitecore instances are 10.1+. A good clue is the end of mainstream support, found at the <a href="https://support.sitecore.com/kb?id=kb_article_view&amp;sysparm_article=KB0641167" target="_blank">Sitecore Product Support Lifecycle</a>:</p>
<table class="table table-striped table-hover table-bordered table-sm ">
<thead>
<tr>
<th scope="col">Product</th>
<th scope="col">Mainstream Support End Date</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">Sitecore 10.0</th>
<td>31-Dec-2023</td>
</tr>
<tr>
<th scope="row">Sitecore 9.3</th>
<td>31-Dec-2022</td>
</tr>
<tr>
<th scope="row">Sitecore 9.2</th>
<td>31-Dec-2022</td>
</tr>
<tr>
<th scope="row">Sitecore 9.1</th>
<td>31-Dec-2021</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<h2>Full comparison table</h2>
<p>If you reached the end of this article and are still unsure, here is a “very unbiased” comparison table:</p>
<table class="table table-striped table-hover table-bordered table-sm " style="width: 100%;">
<thead>
<tr>
<th scope="col"></th>
<th scope="col">Sitecore’s Send Email</th>
<th scope="col">Community’s Send Email</th>
</tr>
</thead>
<tbody>
<tr>
<th style="text-align: center;" scope="row">Installation</th>
<td style="text-align: center;"><img class="alignnone" src="https://upload.wikimedia.org/wikipedia/commons/thumb/1/17/Star_rating_5_of_5.png/799px-Star_rating_5_of_5.png" alt="" width="117" height="25" /><br />
Out of the box</td>
<td style="text-align: center;"><img class="alignnone" src="https://upload.wikimedia.org/wikipedia/commons/thumb/f/fa/Star_rating_4_of_5.png/800px-Star_rating_4_of_5.png" alt="" width="127" height="27" /><br />
Installable module</td>
</tr>
<tr>
<th scope="row">Configuration</th>
<td style="text-align: center;"><img class="alignnone" src="https://upload.wikimedia.org/wikipedia/commons/thumb/1/17/Star_rating_5_of_5.png/799px-Star_rating_5_of_5.png" alt="" width="117" height="25" /><br />
Configuration file</td>
<td style="text-align: center;"><img class="alignnone" src="https://upload.wikimedia.org/wikipedia/commons/thumb/1/17/Star_rating_5_of_5.png/799px-Star_rating_5_of_5.png" alt="" width="117" height="25" /><br />
Configuration file</td>
</tr>
<tr>
<th scope="row">User Interface</th>
<td style="text-align: center;"><img class="alignnone" src="https://upload.wikimedia.org/wikipedia/commons/thumb/1/17/Star_rating_5_of_5.png/799px-Star_rating_5_of_5.png" alt="" width="117" height="25" /><br />
Amazing GUI</td>
<td style="text-align: center;"><img class="alignnone" src="https://upload.wikimedia.org/wikipedia/commons/thumb/2/2f/Star_rating_3_of_5.png/800px-Star_rating_3_of_5.png" alt="" width="127" height="27" /><br />
Content Editor</td>
</tr>
<tr>
<th scope="row">Form Data Replacement</th>
<td style="text-align: center;"><img class="alignnone" src="https://upload.wikimedia.org/wikipedia/commons/thumb/f/fa/Star_rating_4_of_5.png/800px-Star_rating_4_of_5.png" alt="" width="127" height="27" /><br />
Replacement oddities</td>
<td style="text-align: center;"><img class="alignnone" src="https://upload.wikimedia.org/wikipedia/commons/thumb/1/17/Star_rating_5_of_5.png/799px-Star_rating_5_of_5.png" alt="" width="117" height="25" /><br />
Total freedom</td>
</tr>
<tr>
<th scope="row">Compatibility</th>
<td style="text-align: center;">Sitecore 10.1 and above</td>
<td style="text-align: center;">Sitecore 9 and above</td>
</tr>
<tr>
<th scope="row">Developer is awesome</th>
<td style="text-align: center;">Yes</td>
<td style="text-align: center;">Yes</td>
</tr>
<tr>
<th scope="row">Developer can sing</th>
<td style="text-align: center;">No</td>
<td style="text-align: center;">Yes</td>
</tr>
</tbody>
</table>
<p>I think it&#8217;s a draw!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.peplau.com.br/sitecore-10-1-form-send-e-mail-vs-community-send-e-mail/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mass data processing with Rules and Actions - The Sitecore Rule Processor Module</title>
		<link>http://blog.peplau.com.br/mass-data-processing-with-rules-and-actions-the-sitecore-rule-processor-module/</link>
		<comments>http://blog.peplau.com.br/mass-data-processing-with-rules-and-actions-the-sitecore-rule-processor-module/#comments</comments>
		<pubDate>Fri, 13 Nov 2015 16:48:14 +0000</pubDate>
		<dc:creator><![CDATA[Rodrigo Peplau]]></dc:creator>
				<category><![CDATA[Actions]]></category>
		<category><![CDATA[Rules]]></category>
		<category><![CDATA[Sitecore Rule Processor]]></category>

		<guid isPermaLink="false">http://blog.peplau.com.br/?p=261</guid>
		<description><![CDATA[<div class="lr_horizontal_share" data-share-url="http://blog.peplau.com.br/mass-data-processing-with-rules-and-actions-the-sitecore-rule-processor-module/"></div>One of the most laborious things in any CMS, not different in Sitecore, is the mass processing and transformation of data. It&#8217;s specially remarkable when you spend a day or two doing manual selection and edition of individual items for any reason. First time I felt that it was so painful, I ended up obsessed for a tool that could minimally automatize these kind of jobs. A bit of [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>One of the most laborious things in any CMS, not different in Sitecore, is the mass processing and transformation of data. It&#8217;s specially remarkable when you spend a day or two doing manual selection and edition of individual items for any reason. First time I felt that it was so painful, I ended up obsessed for a tool that could minimally automatize these kind of jobs.</p>
<h2>A bit of History</h2>
<p>Surprisingly I couldn&#8217;t find anything, then the only options would be sit and wait for something to arise, or create my own tool. As a born eager, I could not stay still and wait to, sooner or later, be parachuted to my next nightmare. Can&#8217;t sleep with that!</p>
<p><strong>ETL?</strong></p>
<p>When I started looking for options, based on some of my experiences with other systems, my first thought was to build or extend an ETL tool. ETL, which stands for &#8220;extract, transform and load&#8221;, is commonly used in data warehouse systems to massively retrieve, filter and modify data across different sources (SQL servers, XML files, Excel spreadsheets, web services, etc).</p>
<p>With so many good tools at the market, building an ETL tool from scratch would not be smart from my part. My best choose would be to pick an existent tool and make it able to read and write on Sitecore databases. The <strong>ItemWebAPI</strong> would make it possible, but still very low-level. That would also require some significant effort to create the configurations, business logic and interfaces to make it connect and speak with Sitecore.</p>
<p>It stood reverberating on my mind&#8230;</p>
<p><strong>Sitecore Rocks?</strong></p>
<p>I also considered creating an extension to Sitecore Rocks. That sounded like a good idea, as Sitecore Rocks already handles a considerable portion of what is needed to connect and interact with Sitecore databases. It also counts with XPath and query builders, whose logic could be used by my module to retrieve data from Sitecore. But in the other hand it would require Visual Studio to run, which would limit the module coverage, and still some UI and low-level implementation would be required.</p>
<p>And I let it reverberating on my mind&#8230;</p>
<p><strong>A Sitecore Module?</strong></p>
<p>Speaking in abrangence, my tool would preferable be a Sitecore Module instead of anything else. This way I would save time connecting to Sitecore, as the code would be executed inside of it. I would also save energy translating data back and forth as it reads and writes data on Sitecore, since I could simply use the Sitecore API as usual. That would also make things easier as the whole environment is familiar to me, and I wouldn&#8217;t have to dig down to technologies I&#8217;m not familiar with. I was trying to be pragmatic on my purpose of shielding from another nightmare with a minimum effort. Extending an existent Sitecore feature would be the best option.</p>
<p><strong>Sitecore Buckets?</strong></p>
<p>My first real attempt was to extend the <strong>Sitecore Buckets</strong> feature (image below). It has a nice UI for filtering and listing items, as well as some Search Operations that we can use to modify the items selected.</p>
<p><a href="http://blog.peplau.com.br/wp-content/uploads/Buckets1.png"><img class="  wp-image-265 alignnone" src="http://blog.peplau.com.br/wp-content/uploads/Buckets1.png" alt="Sitecore Buckets" width="696" height="426" /></a></p>
<p>The native Buckets system would still have to be modified in order to be used for what I wanted, but it looked like the best option till that time. Some investigation demonstrated that the change wouldn&#8217;t be trivial, more studying and investigation would be needed. I was also not very satisfied with the way that items are filtered, conditions are programmed, and how user friendly it is to build a query.</p>
<p>For some time it simply stood reverberating on my mind&#8230;</p>
<p><strong>The Rules Engine &#8211; An insight from Digital Marketing</strong></p>
<p>It was during the preparation of a Sitecore training course for Content Editors, targeting Digital Marketing features, that I first considered using the Sitecore Rules Engine for my purposes. Despite it is originally used for other things, such as Content Personalization or Event-triggered custom tasks, the experience was very close to what I was thinking. The way conditions and actions are chained is perfect for flexibility and is also very user-friendly.</p>
<p><a href="http://blog.peplau.com.br/wp-content/uploads/Rules.png"><img class=" size-full wp-image-267 alignnone" src="http://blog.peplau.com.br/wp-content/uploads/Rules.png" alt="Rules" width="721" height="526" /></a></p>
<p>That is actually perfect for my intents:</p>
<ul>
<li><span style="text-decoration: underline;"><strong>Rules</strong></span> would now be a way to save a data transforming pattern</li>
<li><span style="text-decoration: underline;"><strong>Conditions</strong></span> could be used to select and filter content</li>
<li><span style="text-decoration: underline;"><strong>Actions</strong></span> would be responsible for data processing and transformations.</li>
<li>They are also <span style="text-decoration: underline;">very easy</span> to code</li>
</ul>
<p>Then the idea started to flow out of my mind into a real tool&#8230;</p>
<h3>The Sitecore Rule Processor</h3>
<p>Available at the Sitecore Marketplace, <a href="https://marketplace.sitecore.net/en/Modules/S/Sitecore_Rule_Processor.aspx" target="_blank"><strong>Sitecore Rule Processor</strong></a> is the result of my efforts to automatize data transforming in Sitecore. After installed, when a Rule is selected at the Content Editor an icon is shown.</p>
<p><a href="http://blog.peplau.com.br/wp-content/uploads/3-Processor-Icon.png"><img class=" size-full wp-image-270 alignnone" src="http://blog.peplau.com.br/wp-content/uploads/3-Processor-Icon.png" alt="Processor Icon" width="617" height="129" /></a></p>
<p>When clicked, it brings up a window to process the rule, where users can easily filter items that matches the rule&#8217;s conditions, then execute their actions against all or some of the items:</p>
<p><a href="http://blog.peplau.com.br/wp-content/uploads/4-Set-Root-and-Bring-Results.png"><img class=" size-full wp-image-271 alignnone" src="http://blog.peplau.com.br/wp-content/uploads/4-Set-Root-and-Bring-Results.png" alt="Set Root and Bring Results" width="838" height="384" /></a></p>
<p>This way any user can visually build queries to retrieve items, and setup actions to transform them.</p>
<p>The module comes with a series of custom Actions, to increase the number of things a user can do to process and modify items, such as:</p>
<ol>
<li>Add a version to the item at a certain language;</li>
<li>Change the item&#8217;s template;</li>
<li>Copy, Move or Clone items to a certain path;</li>
<li>Delete items;</li>
<li>Empty an item&#8217;s field;</li>
<li>Log a message with info taken from the item;</li>
<li>Publish the item;</li>
<li>Replace a string in a field of the item;</li>
<li>Replace a string in an item&#8217;s name;</li>
<li>Run a script;</li>
<li>Serialize the item;</li>
<li>Set a value at an item&#8217;s field;</li>
<li>Set the value of an item&#8217;s field as the value of another item&#8217;s field;</li>
<li>Set the value of an item&#8217;s field as the ID of another item;</li>
<li>Set a workflow state.</li>
</ol>
<p>I still have some useful actions left to do in my backlog, which will expand even more the value of this module.</p>
<h2>Real life experience: existent actions</h2>
<p>Then it finally happened: the next &#8220;monkey-job&#8221; were lurking at the clouds, being parachuted on me without a notice. One of our projects came with this demand: a &#8220;news article&#8221; template had some of its look and feel updated, and it imposed the need to replace some content of a Richtext field in all items (there were around 200 items at the repository). We had to replace all entries of class=&#8221;old-style&#8221; to our new class=&#8221;new-stype&#8221;.</p>
<p>My rule was then composed by:</p>
<ul>
<li><strong>Conditions</strong>
<ul>
<li>Where template=&#8217;News Article&#8217;</li>
</ul>
</li>
<li><strong>Actions</strong>
<ul>
<li>Replace a string in a field of the item
<ul>
<li>Replace class=&#8221;old-style&#8221;</li>
<li>By class=&#8221;new-style&#8221;</li>
<li>At field &#8220;Body&#8221;</li>
</ul>
</li>
</ul>
</li>
</ul>
<p>&nbsp;</p>
<h2>Real life experience: a custom action</h2>
<p>The above covered part of our needs, unfortunately some replacements were not that straight-forward. For instance, some of the markup had to be replaced by different tags. In our case, some tables inserted by the client had to be replaced by better formed &lt;figure&gt; tags.</p>
<p>This demanded the creation of a custom action, which would parse the HTML and apply replacement logic at its Document Object Model, then save it back to the item. To learn how to create a custom action, please check <a href="http://www.sitecore.net/learn/blogs/technical-blogs/john-west-sitecore-blog/posts/2012/03/implement-a-rule-action-to-remove-an-insert-option-in-the-sitecore-aspnet-cms.aspx" target="_blank">this article from John West</a>.</p>
<p>My rule ended up very similar to the previous:</p>
<ul>
<li><strong>Conditions</strong>
<ul>
<li>Where template=&#8217;News Article&#8217;</li>
</ul>
</li>
<li><strong>Actions</strong>
<ul>
<li>My custom action for DOM replacements</li>
</ul>
</li>
</ul>
<p>Please fell free to download and test the module (available on the Sitecore Marketplace <a href="https://marketplace.sitecore.net/en/Modules/S/Sitecore_Rule_Processor.aspx" target="_blank">at this link</a>), and expand it as you need. Also please let me know if you have questions or any feedback!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.peplau.com.br/mass-data-processing-with-rules-and-actions-the-sitecore-rule-processor-module/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Best way to setup Active Directory Module in a Sitecore Solution</title>
		<link>http://blog.peplau.com.br/best-way-to-setup-active-directory-module-in-a-sitecore-solution/</link>
		<comments>http://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="http://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>http://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>
