Wednesday, 29 August 2018

Password related configuration in Sitecore CMS?

As a Sitecore Admin, I wanted to bound the Sitecore member users by

Creating/Updating their login password
 
    By password required as minimum length
    By how many minimum invalid passwords can attempt
    By how many minimum alphanumeric characters required
sitecore-password-configuration

A big thanks to Sitecore that we can easily manage all the configs and changes by some few steps. And with the help of this, we can utilize Sitecore features in the more meaningful way.


So first of all these changes are supposed to be done by Sitecore Admin.
Below are the steps that can be followed while configuring.

Goto Sitecore's web.config which is placed under ~/website/web.config


sitecore-password-settings


<membership defaultProvider="sitecore" hashAlgorithmType="SHA1">
      <providers>
        <clear />
       ...
        <add name="sql" type="System.Web.Security.SqlMembershipProvider" connectionStringName="core" applicationName="sitecore"
minRequiredPasswordLength="1" 
minRequiredNonalphanumericCharacters="0" 
requiresQuestionAndAnswer="false" 
requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" />
        ...
      </providers>

    </membership>

Sunday, 8 July 2018

Sitecore image getting black border on top and bottom?

Sometimes it happens that you may be getting black border on top and bottom of  an sitecore image item.

This is because of different height/width of original image. By default you will get black colour on top and bottom of an image.
There is setting for this in sitecore.config
Inside config you will get this below settings
<!--  MEDIA - DEFAULT IMAGE BACKGROUND COLOR
           The default background color for dynamically resizing images to different aspect ratios than the originals.



           Sitecore applies this background color only for image types that do not support transparency (image/jpeg, image/gif and image/bmp).
           When resizing any other image types (including image/png), Sitecore always applies a transparent background.
           You can specify a color name (such as Black or Red) or a hex color code (such as #CE55E2).
           If you specify no value, Sitecore applies a black background color when resizing such images.
           Default value: ""
     -->
       <setting name="Media.DefaultImageBackgroundColor" value="" />

By default value is empty and that's why you are getting black colour. So you can change color by setting value.