Error: Could not load file or assembly Ninject

Challenge:

Error: Could not load file or assembly ‘Ninject, Version=3.2.0.0, Culture=neutral, PublicKeyToken=c7192dc5380945e7’ or one of its dependencies. The system cannot find the file specified.

Above error started appearing suddenly in our local Sitecore (Sitecore.NET 8.1 (rev. 151207)) project. We eyed lot of articles on-line but none helped, So that is why I thought it’s better to blog this out. We investigated for couple of hours to get this fixed, may be this post saves someone’s time.

(more…)

Share

Read More

Sitecore – CopyTo() not working?

Are you getting the below error while copying Sitecore Media Item(s) from one node to another. For example – from Canada Site to Australia Site?
13664 19:28:32 ERROR Project.WCMS.Extension.Shell.Applications.CopyProductData.SitecoreExtensions.CopyField: Error while saving copiedMediaItem in Copy Product Data Wizard [System.InvalidOperationException: An instance of Sitecore.Data.Items.Item was null. Additional information: Failed to find the root item "/".
at Sitecore.Diagnostics.Assert.IsNotNull(Object value, String message)
at Sitecore.Web.UI.HtmlControls.DataContext.GetState(Item& root, Item& folder, Item[]& selected)
at Sitecore.Web.UI.HtmlControls.DataContext.GetState(Item& root, Item& folder)
at Sitecore.Web.UI.HtmlControls.DataContext.ItemCreatedNotification(Object sender, ItemCreatedEventArgs args)
at Sitecore.Data.Events.ItemCreatedDelegate.Invoke(Object sender, ItemCreatedEventArgs args)
at Sitecore.Events.Event.RaiseItemCreated(Object sender, ItemCreatedEventArgs args)
at System.EventHandler
1.Invoke(Object sender, TEventArgs e)
at Sitecore.Data.Engines.DataEngine.RaiseCreated(EventHandler
1 handlers, Item item, SafeDictionary2 visited)
at Sitecore.Data.Engines.DataEngine.DataEngine_CopiedItem(Object sender, ExecutedEventArgs
1 e)
at System.EventHandler1.Invoke(Object sender, TEventArgs e)
at Sitecore.Data.Engines.EngineCommand
2.RaiseEvent[TArgs](EventHandler1 handlers, Func2 argsCreator)
at Sitecore.Data.Engines.DataCommands.CopyItemCommand.Executed()
at Sitecore.Data.Engines.EngineCommand`2.Execute()
at Sitecore.Data.Engines.DataEngine.CopyItem(Item source, Item destination, Boolean deep, String copyName, ID copyId)
at Sitecore.Data.Managers.ItemProvider.CopyItem(Item source, Item destination, Boolean deep, String copyName, ID copyId)
at Sitecore.Data.Managers.ItemManager.CopyItem(Item source, Item destination, Boolean deep, String copyName, ID copyId)
at Project.WCMS.Extension.Shell.Applications.CopyProductData.SitecoreExtensions.CopyField(Item item, Field sourceField) in \Project.WCMS.Extension\Shell\Applications\CopyProductData\CopyProductDataWizard.cs:line 982]

(more…)

Share

Read More

Sitecore Executive Dashboard Error: An error occurred while loading report data. Please try again or contact your administrator.

Are you getting the below exception in Executive Insight Dashboard then this post is for you.

1. Error

Executive Insight Dashboard isn’t loading data at all. This was happening with us when we were accessing production analytics data. There was no any message in Logs. It was very confusing for us because you have no clue what is happening without logs.  (more…)

Share

Read More

Using AutoMapper

Challenge:

We defined the Web-Service and were using it in an application. Web-Service returns an object or list of an object.

 

There was already code written to do the processing once we get the response object from web-service.But when we get the object via web-service, it append the Web Service Reference Name because of which we were not able to utilize the already written code for processing that object. We believe in Re-usability as much as possible and wanted to re-utilize that code which was also used by other functions. Web-Service was returning lot of data which includes list and list of object inside the list etc.

Share

Read More

Working with lac users in Sitecore

Challenge:

Recently we were working on a Project which includes lac of users. Our application includes Login/Logout Mechanism – which is the base for any Ecommerce Application. Yes it is an Ecommerce Application.

 

Initially while developing a Project we were having few records around 2000. So Sitecore was performing pretty well. But as we went Live with 300000 records. Sitecore went down. It took roughly 4+ Minutes to GetAllUsers. And 5 Minutes to process all the records, compare Custom Property which was needed in our case. So it was taking around 10 Minutes to Login. It was very critical time for us to get the things done as soon as possible. With the help of Sitecore – We came to know that only best approach in this case is to go with SQL Query. And Yes – Stored Procedure did our Job. We created a Stored Procedure that does the processing which we were doing via Code. So that reduced time to less than 6 Seconds – Hurray! (Refer: https://sitecorebasics.wordpress.com/2015/11/21/sitecore-login-time-from-10-minutes-to-seconds/ for more details on this.)
Sitecore internally uses the Membership Object of Asp.Net.

(more…)

Share

Read More

My First Sitecore Module – Google Product Feed

Hello Folks,I have been working on Google Product Feed in one of the Project.

What is Google Product Feed?

It is a feed in XML Format which we can submit to google for listing the products in Google Shopping Tab.

A google product feed xml file has list of product which use groupings of attributes that define each product in a unique way. Attributes, such as ‘condition’ and ‘availability’, can have standardized values, or accepted “answers,” or attributes can be open to fill with your own choice of value, such as ‘id’ or ‘title’. Accurately describing items using these attributes allows users to search and find your items more easily.
(more…)

Share

Read More