Hi 

Here is the content of the code behind and I tested it with the latest version and it works great

################ code starts ###############

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.SessionState;
using Telerik.Sitefinity.Configuration;
using Telerik.Sitefinity.Abstractions.VirtualPath.Configuration;
using Telerik.Sitefinity.Abstractions.VirtualPath;

namespace SitefinityWebApp
{
    partial  class Global : System.Web.HttpApplication
    {

        protected void Application_Start(object sender, EventArgs e)
        {
		FixLicense();
            Telerik.Sitefinity.Abstractions.Bootstrapper.Initialized += new EventHandler<Telerik.Sitefinity.Data.ExecutedEventArgs>(Bootstrapper_Initialized);
        }

        protected void Bootstrapper_Initialized(object sender, Telerik.Sitefinity.Data.ExecutedEventArgs args)
        {
         //   Telerik.Sitefinity.Web.UI.Dialogs.RegisterDialog<Telerik.Sitefinity.Samples.SimpleImageSelectorDialog>();
            this.InstallCustomVirtualPaths();
        }

        private void InstallCustomVirtualPaths()
        {
            ConfigManager manager = ConfigManager.GetManager();
            var virtualPathConfig = manager.GetSection<VirtualPathSettingsConfig>();
            ConfigManager.Executed += new EventHandler<Telerik.Sitefinity.Data.ExecutedEventArgs>(ConfigManager_Executed);
            var thumbnailSelectorVirtualPathConfig = new VirtualPathElement(virtualPathConfig.VirtualPaths)
            {
                VirtualPath = "~/ThumbnailSelector/*",
                ResolverName = "EmbeddedResourceResolver",
                ResourceLocation = "ThumbnailSelectorField"
            };
            if (!virtualPathConfig.VirtualPaths.ContainsKey("~/ThumbnailSelector/*"))
            {
                virtualPathConfig.VirtualPaths.Add(thumbnailSelectorVirtualPathConfig);
                manager.SaveSection(virtualPathConfig);
            }
        }

        private void ConfigManager_Executed(object sender, Telerik.Sitefinity.Data.ExecutedEventArgs args)
        {
            if (args.CommandName == "SaveSection")
            {
                var section = args.CommandArguments as VirtualPathSettingsConfig;
                if (section != null)
                {
                    // Reset the Virtual path manager, whenever the section of the VirtualPathSettingsConfig is saved.
                    // This is needed so that the prefixes for templates in our module assembly are taken into account.
                    VirtualPathManager.Reset();
                }
            }
        }

        protected void Session_Start(object sender, EventArgs e)
        {
		FixLicense();
        }

        protected void Application_BeginRequest(object sender, EventArgs e)
        {
		FixLicense();
        }

        protected void Application_AuthenticateRequest(object sender, EventArgs e)
        {

        }

        protected void Application_Error(object sender, EventArgs e)
        {

        }

        protected void Session_End(object sender, EventArgs e)
        {

        }

        protected void Application_End(object sender, EventArgs e)
        {

        }
	void FixLicense()
    {
        var license = Telerik.Sitefinity.Licensing.LicenseState.Current.LicenseInfo;

        var licenseInfoType = Telerik.Sitefinity.Licensing.LicenseState.Current.LicenseInfo.GetType();
        licenseInfoType.GetProperty("IsTrial").SetValue(license, false, null);
        licenseInfoType.GetProperty("DisableSubDomains").SetValue(license, false, null);
        licenseInfoType.GetProperty("IsValid").SetValue(license, true, null);
        licenseInfoType.GetProperty("IsCorrupted").SetValue(license, false, null);
        licenseInfoType.GetProperty("IsHosted").SetValue(license, false, null);
        licenseInfoType.GetProperty("IsGranularPermissionsEnabled").SetValue(license, true, null);
        licenseInfoType.GetProperty("IsPageControlsPermissionsEnabled").SetValue(license, true, null);
        licenseInfoType.GetProperty("IsPagesGranularPermissionsEnabled").SetValue(license, true, null);
        licenseInfoType.GetProperty("IssueDate").SetValue(license, new DateTime(2012, 1, 1), null);
        licenseInfoType.GetProperty("LicenseId").SetValue(license, "1234567890", null);
        licenseInfoType.GetProperty("LicenseType").SetValue(license, "PU", null);
        licenseInfoType.GetProperty("LocalizationFeaturesLevel").SetValue(license, 100, null);
        licenseInfoType.GetProperty("WorkflowFeaturesLevel").SetValue(license, 100, null);
        licenseInfoType.GetProperty("SupportLoadBalancing").SetValue(license, true, null);
        licenseInfoType.GetProperty("TotalContentLimit").SetValue(license, 0, null);
        licenseInfoType.GetProperty("TotalNewsLettersSubscribersCount").SetValue(license, 0, null);
        licenseInfoType.GetProperty("TotalPublicPagesLimit").SetValue(license, 0, null);
        licenseInfoType.GetProperty("Users").SetValue(license, 0, null);

        var version = new System.Version(5, 0);
        licenseInfoType.GetProperty("ProductVersion").SetValue(license, version, null);

        var modules = ((List<Telerik.Sitefinity.Licensing.LicensedModuleInfo>)licenseInfoType.GetField("licensedModules", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance).GetValue(license));
        AddModule(modules, Telerik.Sitefinity.Licensing.LicenseInfo.LoadBalancingModuleId, "LoadBalancingModule");
        AddModule(modules, new Guid("A64410F7-2F1E-4068-81D0-E28D864DE323"), "FormsControl");
        AddModule(modules, new Guid("3D8A2051-6F6F-437C-865E-B3177689AC12"), "SubscribeForm");
        AddModule(modules, new Guid("5EE33DC2-4B4D-4A9E-AFBF-E181D12302A8"), "MigrationModule");
        AddModule(modules, new Guid("20FF9B05-F217-495D-A1B0-DD747232B0F3"), "SiteSyncModule");
        AddModule(modules, new Guid("EFDBA480-3FB1-4832-8BE5-595F1E542343"), "ShoppingCartModule");
        AddModule(modules, new Guid("3FCBCF1F-E3DE-4C5E-9052-932B9232672B"), "AnalyticsControl");

        license.Customer.Email = "YOUR EMAIL";
        license.Customer.Id = "1";
        license.Customer.Name = "Your Name";
        licenseInfoType.GetProperty("ExpirationDate").SetValue(license, DateTime.MaxValue, null);

        var domains = ((List<string>)licenseInfoType.GetField("domains", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance).GetValue(license));
        AddDomain(domains, "YOUR DOMAIN NAME");


        var licenseState = Telerik.Sitefinity.Licensing.LicenseState.Current;
        var licenseStateType = Telerik.Sitefinity.Licensing.LicenseState.Current.GetType();

        licenseStateType.GetProperty("MissingLicense").SetValue(licenseState, false, null);
        licenseStateType.GetProperty("InvalidProductVersion").SetValue(licenseState, false, null);
    }
    void AddDomain(List<string> domains, string domain)
    {
        if (domains.Contains(domain))
            return;

        domains.Add(domain);
    }

    void AddModule(List<Telerik.Sitefinity.Licensing.LicensedModuleInfo> modules, Guid id, string name)
    {
        for (var i = 0; i < modules.Count; i++)
        {
            if (modules[i].Id == id)
                return;
        }

        var module = new Telerik.Sitefinity.Licensing.LicensedModuleInfo();
        var moduleType = module.GetType();
        moduleType.GetProperty("Id").SetValue(module, id, null);
        moduleType.GetProperty("Name").SetValue(module, name, null);
        modules.Add(module);
    }


		
    }
}

########## code end ################################