Sitecore ECM - Remove App Center Warnings

Did you not purchased the Spam Detecter and/or the Email Preview service from the Sitecore App Center? ECM will constantly warn you with red massive ribbons as showed below. It is really a disturbing warning, when you work with the ECM (version 2.x).




If you want to remove the warnings, you simple have to delete the two following items (remember to back up the two items):

  • /sitecore/system/Modules/SPEAK/EmailCampaign/TaskPages/AdHockTaskPage/Review/EmailPreview
  • /sitecore/system/Modules/SPEAK/EmailCampaign/TaskPages/AdHockTaskPage/Review/SpamCheck

Here u go, After removing the two items, ECM no longer shows the warnings.

Disabling WebDAV

Do you use WebDAV when uploading media files to Sitecore? If not, why not disable WebDAV and reduce the number of log files and errors in the system log file? At least consider disabling it at your Content Delivery servers. It is easy and requires only five step and it is all done in the web.config file.

Step 1
Locate and remove (or out comment) the appender section named “WebDAVLogFileAppender” in within the setting (This section defines the location of the log files).
 
<appender name="LogFileAppender" type="log4net.Appender.SitecoreLogFileAppender, Sitecore.Logging">
      <file value="$(dataFolder)/logs/log.{date}.txt" />
      <appendToFile value="true" />
      <layout type="log4net.Layout.PatternLayout">
        <conversionPattern value="%4t %d{ABSOLUTE} %-5p %m%n" />
      </layout>
    </appender>
<!--    <appender name="WebDAVLogFileAppender" type="log4net.Appender.SitecoreLogFileAppender, Sitecore.Logging">
      <file value="$(dataFolder)/logs/WebDAV.log.{date}.txt" />
      <appendToFile value="true" />
      <layout type="log4net.Layout.PatternLayout">
        <conversionPattern value="%4t %d{ABSOLUTE} %-5p %m%n" />
      </layout>
    </appender> -->
    <appender name="SearchLogFileAppender" type="log4net.Appender.SitecoreLogFileAppender, Sitecore.Logging">
      <file value="$(dataFolder)/logs/Search.log.{date}.txt" />
      <appendToFile value="true" />
      <layout type="log4net.Layout.PatternLayout">
        <conversionPattern value="%4t %d{ABSOLUTE} %-5p %m%n" />
      </layout>
    </appender>

Step 2
Locate the system.webServer section and remove (or out comment) setting the remove setting named “WebDAVModule”.
 
<system.webServer>
    <modules runAllManagedModulesForAllRequests="true">
     <!-- <remove name="WebDAVModule" />-->
      <add type="Sitecore.Web.RewriteModule, Sitecore.Kernel" name="SitecoreRewriteModule" />
…
  </modules>

Step 3
At the handlers section of the system.webServer locate and remove (or comment out) the following three settings of WebDAV
 
    <handlers>
<!--      <add name="WebDAVRoot" path="*" verb="OPTIONS,PROPFIND" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" resourceType="Unspecified" preCondition="classicMode,runtimeVersionv4.0,bitness32" />
      <add name="WebDAVRoot64" path="*" verb="OPTIONS,PROPFIND" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" resourceType="Unspecified" preCondition="classicMode,runtimeVersionv4.0,bitness64" />
      <add verb="*" path="sitecore_webDAV.ashx" type="Sitecore.Resources.Media.WebDAVMediaRequestHandler, Sitecore.Kernel" name="Sitecore.WebDAVMediaRequestHandler" /> -->
…
</handlers>

Step 4
Locate the httpHandlers section at system.Web and remove (or comment out) the WebDAV setting.
 
<httpHandlers>
      <add verb="*" path="sitecore_webDAV.ashx" type="Sitecore.Resources.Media.WebDAVMediaRequestHandler, Sitecore.Kernel" />
      <add verb="*" path="sitecore_media.ashx" type="Sitecore.Resources.Media.MediaRequestHandler, Sitecore.Kernel" />

Step 5
When you have comment out all the web.config settings of WebDAV listed above, you can now disable the Sitecore.WebDAV.config file from App_Config/Include folder.

Cleanup strategy missing WebDAV, Search and Cragling

What about the cleanup strategy for WebDAV.log, Search.log and Crawling.log, Sitecore?


Whenever Sitecore version 7.X restarts, it creates four new log files. The naming and location of these log files are managed in the <log4net> setting in the web.config file. The first log file Sitecore creates is the system log file. This log file is named log.[yyyyMMdd].txt and is managed at the "LogFileAppender". The second log file is the WebDAV log file named WebDAV.log.[yyyyMMdd].txt handled by the "WebDAVLogFileAppender". The third handles the search indexing operations named Search.log.[yyyyMMdd].txt and fourth handles the logging for search query operations named Crawling.log.[yyyyMMdd].txt and are managed at the "SearchLogFileAppender" and "CrawlingLogFileAppender" respectively.

If Sitecore restarts more than once a day, the time of creation (HHmmss) will be added to the all subsequent log files for that specific day E.g. log.[yyyyMMdd].[HHmmss].txt.

The "Appender" section contains:
    
<appender name="LogFileAppender" type="log4net.Appender.SitecoreLogFileAppender, Sitecore.Logging">
    <file value="$(dataFolder)/logs/log.{date}.txt">
        <appendtofile value="true">
            <layout type="log4net.Layout.PatternLayout">
                <conversionpattern value="%4t %d{ABSOLUTE} %-5p %m%n" />
            </layout>
        </appendtofile>
    </file>
</appender>
<appender name="WebDAVLogFileAppender" type="log4net.Appender.SitecoreLogFileAppender, Sitecore.Logging">
    <file value="$(dataFolder)/logs/WebDAV.log.{date}.txt">
        <appendtofile value="true">
            <layout type="log4net.Layout.PatternLayout">
                <conversionpattern value="%4t %d{ABSOLUTE} %-5p %m%n" />
            </layout>
        </appendtofile>
    </file>
</appender>
<appender name="SearchLogFileAppender" type="log4net.Appender.SitecoreLogFileAppender, Sitecore.Logging">
    <file value="$(dataFolder)/logs/Search.log.{date}.txt">
        <appendtofile value="true">
            <layout type="log4net.Layout.PatternLayout">
                <conversionpattern value="%4t %d{ABSOLUTE} %-5p %m%n" />
            </layout>
        </appendtofile>
    </file>
</appender>
<appender name="CrawlingLogFileAppender" type="log4net.Appender.SitecoreLogFileAppender, Sitecore.Logging">
    <file value="$(dataFolder)/logs/Crawling.log.{date}.txt">
        <appendtofile value="true">
            <layout type="log4net.Layout.PatternLayout">
                <conversionpattern value="%4t %d{ABSOLUTE} %-5p %m%n" />
            </layout>
        </appendtofile>
    </file>
</appender>

If you compare the "appender" settings listed above with the "Sitecore.Tasks.CleanupAgent" placed at <sitecore> <scheduling> <agent> setting you will notice that the CleanupAgent does not contain any remove settings regarding the log files of WebDAV, Search or Crawling. Put in another way, by default Sitecore does not clean up this three log files, which results in a solution with an unmanageable number log files (If you take this into a Sitecore version 6.X, you get the same regarding the WebDAV log files).

It is easy to set up Sitecore to clean up the three additional log files. You could simply prefix "log.*.txt" with "*." at:
            
<remove folder="$(dataFolder)/logs" pattern="log.*.txt" maxcount="50" minage="30.00:00:00" />


Ending up with this:
            
<remove folder="$(dataFolder)/logs" pattern="*.log.*.txt" maxCount="50" minAge="30.00:00:00" />
In this case, the three additional log files will follow the same life cycle as the system log file. If you want specific life cycles for each of the log files you could add specific "remove" settings for each of the log files ending up with something like this:

<files hint="raw:AddCommand">
    <remove folder="$(dataFolder)/logs" pattern="log.*.txt" maxcount="50" minage="30.00:00:00" />
    <remove folder="$(dataFolder)/logs" pattern="WebDAV.log.*.txt" maxcount="20" minage="7.00:00:00" />
    <remove folder="$(dataFolder)/logs" pattern="Search.log.*.txt" maxcount="20" minage="7.00:00:00" />
    <remove folder="$(dataFolder)/logs" pattern="Crawling.log.*.txt" maxcount="20" minage="7.00:00:00" />
… 
</files>

In this case, Sitecore will store the system log file at least for 30 days, if the number of system log files does not exceed the number of 50, while Sitecore will only store the log files of WebDAV, Search and Crawling for seven days.

If you are not using WebDAV in your Sitecore solution, you can easily disable it. This is how you disable WebDAV.

CleanUpAgent and Log Files

Normally I have a checklist of different configurations, settings etc. I change, whenever I setup a new Sitecore solution. One of the items on the list is how long Sitecore saves the system log files. It is frustrating to investigate an error, if the system log file has been deleted.

Sitecore has an agent that handles the cleanup strategy, and by default, Sitecore deletes system log files when they are older than 7 days. It is easy to change and handled in the web.config. The cleanup strategy of the log files is managed by the Sitecore.Tasks.CleanupAgent placed at <sitecore><scheduling><agent> setting in the web.config file.


        
        
          
          
          
          
          
        
      

If you want Sitecore to store the system log files for E.g. the last 30 days, you should change the [minAge] from “7.00:00:00” attribute to “30.00:00:00”. Taking into account, the [maxCount] attribute by default is valued “20”, Sitecore will only store 20 of the system log files. Therefore, you should either change the [maxCount] to at least “30”, delete the attribute or add [rolling=”true”] to ignore the [maxCount] and [minCount] attribute.

It would look like these:
      

Disable SPEAK dialogs - Sitecore

Did you have trouble with Sitecore SPEAK dialogs in Sitecore? We had!

Because Sitecore SPEAK adds these dialogs by overriding the existing dialogs in Sitecore, you can easily disable the SPEAK dialogs and use the old standard dialogs instead.

Sitecore has added a new include file, managing whether Sitecore uses the SPEAK dialogs or the old classic dialogs. Among other sections, the include file contain sections concerning the dialogs of media item and links, respectively. The include file is named Sitecore.Speak.config (and is stored at /App_Config/Includes/ next to all the other include files). In the include file you can easily override/comment out the SPEAK dialogs, you do not want to use.

<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
  <sitecore>
    <overridexmlcontrols>
      <override with="/sitecore/client/applications/Dialogs/SelectMediaDialog" xmlcontrol="Sitecore.Shell.Applications.Media.MediaBrowser" />
    </overridexmlcontrols>
 
    <overridedialogs>
      <override dialogurl="/sitecore/shell/Applications/Dialogs/Internal%20link.aspx" with="/sitecore/client/applications/dialogs/InsertLinkViaTreeDialog" />
      <override dialogurl="/sitecore/shell/Applications/Dialogs/Mail%20link.aspx" with="/sitecore/client/applications/dialogs/InsertEmailDialog" />
      <override dialogurl="/sitecore/shell/Applications/Dialogs/Anchor%20link.aspx" with="/sitecore/client/applications/dialogs/InsertAnchorDialog" />
      <override dialogurl="/sitecore/shell/Applications/Item%20browser.aspx" with="/sitecore/client/applications/dialogs/InsertSitecoreItemViaTreeDialog" />
    </overridedialogs>
 
    ...
    ...
  </sitecore>
</configuration>


Remember Me Persistent login - Sitecore

If you have a web organization based at authors (student work etc.) helping creating content in a short period and afterwards leave the web organization, you might consider to change how long the “Remember me” at the login page should be persistent.

This is handled in the /sitecore/settings/setting element named “Authentication.ClientPersistentLoginDuration” which by default is set to 180 days.



Enforce Password Minimum Length Sitecore

Sitecore security relies on ASP.NET membership, role and profile providers. By standard, you can configure the membership options in the web.config file using the /configuration/system.web/membership/providers/add elements.

If you want to ensure the minimum length of a new user password, select the provider element named “slq” and change the attribute named “minRequiredPasswordLength” to be equal to the minimum length you required.