Wednesday, November 18, 2009

Connection Pooling

Some things after discovering look trivial and clear, but it takes time to find this simple reason. I found a lot of question in Internet, and almost no useful answers.

After SQL server restart you might get the error in your ASP.NET application: "A transport-level error has occurred when sending the request to the server. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.) "

The reason is hiding in SQL Server Connection Pooling http://msdn.microsoft.com/en-us/library/8xx3tyca.aspx

You can do a simple test by adding ;Pooling=false to your connection string to Sitecore databases and now your application will not crash whenever SQL restarts.

Impact Connection Pooling on performance for a stand-alone Sitecore installation - is what I will try now to investigate.

Monday, October 12, 2009

Localization of RADControls in Sitecore

One can see that there are a few places in Sitecore CMS backend that are not localized. And that's because they fall out usual translation way.

In particular we are talking about RAD controls: Rich-Text Editor and SpellChecker.

Telerik supports own way of localization their controls via XML files, but this approach doesn't work in Sitecore out-of-the-box.

My investigation was primary aimed on finding the easy enablish RAD controls localization without coding. In particular according to code and Reflector setting the setting CacheLocalization in sitecore\shell\RadControls\Editor\ConfigFile.xml to 'true' should help. Especially since direct requiesting the page sitecore/shell/RadControls/Editor/localization.aspx?type=editor&language=da worked perfectly. Unfortunately playing with settings didn't help.

Thus the last approach was to set Telerik.WebControls.RadEditor.Language property via code.

I used great article from Alexey Romaniuha as an example.

As a result the workaround to enable localization in RAD Controls in Sitecore looks like:

1. Compile the code and put appropriate DLL into bin:


using System;
using Sitecore.Web;

namespace Sitecore.LocalizationEnabling
{
public class RADSpellWithLangSwitcher : Sitecore.Shell.Controls.RADEditor.RADEditor
{
new protected void Page_Load(object sender, EventArgs args)
{
string lang = Sitecore.Context.Language.ToString();

if (lang == "en")
{
lang = "en-US";
}
this.Editor.Language = lang;

base.Page_Load(sender, args);

}
}
}


2. Replace in the sitecore\shell\Controls\Rich Text Editor\Default.aspx file

@ Page Language="c#" Inherits="Sitecore.Shell.Controls.RADEditor.RADEditor"

with

@ Page Language="c#" Inherits="Sitecore.LocalizationEnabling.RADSpellWithLangSwitcher"

3. Create a folder with language code under \sitecore\shell\RadControls\Editor\Localization\ folder.

I guess the approach for the SpellCheker is completely the same, just not publishing it here.

Friday, May 22, 2009

License Expiration Notifier – scheduled task

I’ve created a simple scheduled task – it check expiration date of the Sitecore license at the installation where it's run and sends warning (or writes to log file) in case expiration date comes in a certain number of days.Should prevent from unexpected license expiration and hence from site downtime.

In case nobody objects, it will appear at
http://trac.sitecore.net soon.

Wednesday, February 18, 2009

Taking over Product Catalogue sample site

As a part of some free-time developing I took over Product Catalogue sample site (which I saw was requested for updating by someone).
The first stage - direct upgrade to Sitecore V6 is done:
http://trac.sitecore.net/ProductCatalogue

If you have ideas or wishes for this solution, please mail them to me at dv sitecore.net and I will continue improving it with pleasure.