Thursday, 31 August 2017

How to use Twitter in Sitecore Experience Accelerator SXA 200th Blog

Almost 4 years back I wanted to maintain online diary where I can augment all my Sitecore learning and think of writing blogs so it helps me along with the world wide Sitecore community.

Here comes my first welcome blog  Learning Sitecore CMS Welcome Blog.

Time went like a rocket and did not realize me this current blog post is special and it's 200th blog post for Learning Sitecore CMS.

In today Session I will be covering how to use Twitter in Sitecore Experience Accelerator.

To start with first create one twitter application in Twitter Application Management 

Go to Keys and Access Token and You should be ready with below.

  • Consumer Key (API Key)
  • Consumer Secret (API Secret)
  • Access Token
  • Access Token Secret
Oh, Enough we can't wait for any further without launching Sitecore Launch Pad.

Alright lets Launch Sitecore                                                                                                                  

Open the Experience Editor Mode and add the Twitter Component.

Use existing or New associated content; In my case, I am choosing an existing component as shown below.

The item path for the existing item for me   was as below.                                                                                                                                                       /sitecore/content/PradeepNewtenant/myllandingpage/Data/Twitters/MyTwitter

The actual setting of items is as shown below.

The twitter app credentials need to be augmented @

 /sitecore/content/PradeepNewtenant/myllandingpage/Settings/Twitter Apps/Pradeep Twitter App

All done time to see the results.

It works as shown below.

My deep love with my latest crush is Sitecore SXA continues  :)

Happy Sitecore Experience Acceleration.

Tuesday, 29 August 2017

Fixing the Error While Installing Sitecore 8.2 Complete Set Up : The type 'System.Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=

I face one unexpected issue while installing Sitecore 8.2 using Sitecore 8.2 rev. 160729.exe

I will say unexpected because I have used the same installer in order to install the Sitecore Complete Instance at least 10 times.

The Error is as below

Compilation Error

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: CS0012: The type 'System.Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.

Source Error:

Line 10: @model Sitecore.Mvc.Presentation.RenderingModel
Line 11: @{
Line 12:   var rendering = Html.Sitecore().Controls().
Line 13:   rendering.Class = "sc-launchpad";
Line 14:   

Source File: c:\inetpub\wwwroot\Habitat\Website\sitecore\shell\client\Applications\LaunchPad\Layouts\Renderings\LaunchBar.cshtml    Line: 12 

As the Error is clearly saying  You must add the Reference to 'System.Runtime

I copied the System.Runtime.dll from below location

C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\Facades

to Bin folder of Sitecore Instance; In my case it was


It was relaxed feeling when I saw launchpad screen back

Happy Sitecore

How to use Google Map in Sitecore Experience Accelerator

 Add a Google Map Rendering as shown below

Try to use existing or new content as per need

When we preview you get the below OOPS message.

In order to fix this issue, we need to provide Map Provider setting as shown below.

Voila, finally we got something rendered.

But life always needs more and is always demanding I want to display Dubai as location.We can update map item in order to get the desired results as shown below.

 Hurray all set I am all set now.

I am in deep love with my latest crush is Sitecore SXA. :)

Monday, 28 August 2017

How to use Image in Sitecore Experience Accelerator

Open the experience editor mode as shown below

Click in the header section of the grid as shown below.

Add an image rendering as shown below.

Select the associated content from existing content or create a new one

Click on choose an image

You can upload a new image.
From Existing media library.

Now open the site in preview mode as shown below

Voila all done

I am in deep love with my latest crush is Sitecore SXA. :)

How to get list of Users by Roles in Sitecore

Select T.RoleName ,UserName From (
  FROM [Core].[dbo].[aspnet_UsersInRoles]
  inner join aspnet_Roles on [Core].[dbo].[aspnet_UsersInRoles].Roleid = aspnet_Roles.RoleId

 ) AS T

 inner join   [Core].[dbo].[aspnet_Users] on T.USERID  = [Core].[dbo].[aspnet_Users].USERID

  order by RoleName