Five versions of Visual Studio

Jul 19, 2015 Posted by Lara Kannan 0 comments
There are five version of Visual Studio

  • Express => the free version. Limited in functionality. Does not support extensions.

  • Professional => has most of the development tools.

  • Premium => adds Coded UI testing

  • Ultimate => adds web performance and load testing.

  • Test professional => has some test tools but no development tools..
Web performance and load tests are only available within Visual Studio Ultimate edition. See


Sitecore 8 - Date issue

Jul 3, 2015 Posted by Lara Kannan 0 comments
In Sitecore 8, my due date column has the value like 2015-07-03 00:00:00. This date was displayed in UI as 2015-07-02 22:00:00+2.

The issue arises, because Sitecore have implemented a feature that tries to handle local time zones on the server. Old Sitecore 7.5 dates are stored without any timezone information

  • 20150412T000000
In Sitecore 8, Sitecore have changed the raw data format of the date field by taking the timezone into consideration. Which in my case means that my 2014-04-12 00:00:00 becomes 2015-04-11 22:00:00

  • 20150411T220000Z
Notice the “Z” at the end? This implies that this is a datetime that have a timezone, and the timezone is now 2 hours behind UTC.

To fix the old datetime fields, I need to tell Sitecore which timezone non-timezone-datetime fields have. This is the setting, ServerTimeZone:

<setting name="ServerTimeZone" value="UTC" />

I also needed to update the Lucene index, as the invalid datetime was added to the index as well.

Thanks to Peter Wind who helped find this issue.

Or else, use below method:
 DateTime dateShow = Sitecore.DateUtil.IsoDateToDateTime(showDate);        
 DateTime localDate = TimeZone.CurrentTimeZone.ToLocalTime(dateShow);   



How to get image URL from site-core via C#

Jul 2, 2015 Posted by Lara Kannan 0 comments
This is just a quick post to show how to get image URL via code behind C#.

This is mostly useful when you are binding children items to a repeater or returning image URL in a JSON web-service.

 public static string GetImageURL(Item currentItem)  
      string imageURL = string.Empty;  
      Sitecore.Data.Fields.ImageField imageField = currentItem.Fields["Image"];  
      if (imageField != null && imageField.MediaItem != null)  
       Sitecore.Data.Items.MediaItem image = new Sitecore.Data.Items.MediaItem(imageField.MediaItem);  
       imageURL = Sitecore.StringUtil.EnsurePrefix('/', Sitecore.Resources.Media.MediaManager.GetMediaUrl(image));  
 return imageURL;  

Special Thanks To : 

Labels: ,