4.3 -> 4.4 update hell

Posted by Community Admin on 04-Aug-2018 00:29

4.3 -> 4.4 update hell

All Replies

Posted by Community Admin on 21-Dec-2011 00:00

After installing the 4.4 update and selecting "Upgrade" from the Sitefinity Project Manager, config file version info is not automatically updated from 4.3.1885.0 to 4.4.2117.0 resulting in the following error when accessing the site:

Server Error in '/NLGSitefinityWebApp' Application.

Could not load file or assembly 'Telerik.Sitefinity, Version=4.3.1885.0, Culture=neutral, PublicKeyToken=b28c218413bdf563' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.IO.FileLoadException: Could not load file or assembly 'Telerik.Sitefinity, Version=4.3.1885.0, Culture=neutral, PublicKeyToken=b28c218413bdf563' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Assembly Load Trace: The following information can be helpful to determine why the assembly 'Telerik.Sitefinity, Version=4.3.1885.0, Culture=neutral, PublicKeyToken=b28c218413bdf563' could not be loaded.

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

Stack Trace:

[FileLoadException: Could not load file or assembly 'Telerik.Sitefinity, Version=4.3.1885.0, Culture=neutral, PublicKeyToken=b28c218413bdf563' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)]
   System.Signature.GetSignature(SignatureStruct& signature, Void* pCorSig, Int32 cCorSig, RuntimeFieldHandleInternal fieldHandle, IRuntimeMethodInfo methodHandle, RuntimeType declaringType) +0
   System.Signature..ctor(IRuntimeMethodInfo methodHandle, RuntimeType declaringType) +101
   System.Reflection.RuntimeMethodInfo.get_ReturnType() +57
   System.Web.HttpApplicationFactory.ReflectOnMethodInfoIfItLooksLikeEventHandler(MethodInfo m) +34
   System.Web.HttpApplicationFactory.ReflectOnApplicationType() +11693888
   System.Web.HttpApplicationFactory.Init() +11694546
   System.Web.HttpApplicationFactory.EnsureInited() +74
   System.Web.Compilation.BuildManager.CompileGlobalAsax() +147
   System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +786

[HttpException (0x80004005): Could not load file or assembly 'Telerik.Sitefinity, Version=4.3.1885.0, Culture=neutral, PublicKeyToken=b28c218413bdf563' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)]
   System.Web.Compilation.BuildManager.ReportTopLevelCompilationException() +100
   System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +1126
   System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +1209

[HttpException (0x80004005): Could not load file or assembly 'Telerik.Sitefinity, Version=4.3.1885.0, Culture=neutral, PublicKeyToken=b28c218413bdf563' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +11686928
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +141
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +4863749

I ran into the same problem with the 4.3.1885.0 update and was able to fix it at that time by doing a search and replace and replacing the old version with the now.  No such luck in this instance.  After the mass search and replace the solution builds properly but I get the following error when I try to access an page:

Server Error in '/NLGSitefinityWebApp' Application.

No collection element matches the given key in a remove operation.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Configuration.Provider.ProviderException: No collection element matches the given key in a remove operation.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[ProviderException: No collection element matches the given key in a remove operation.]
   Telerik.Sitefinity.Configuration.Data.XmlConfigProvider.LoadCollectionElement(ConfigElementCollection collection, XmlReader reader, ConfigPolicyHandler policyHandler, String policyName, UpgradingInfo upgradingInfo) +1785
   Telerik.Sitefinity.Configuration.Data.XmlConfigProvider.LoadElement(ConfigElement element, XmlReader reader, ConfigPolicyHandler policyHandler, String policyName, UpgradingInfo upgradingInfo, Boolean isNew, Boolean validateTagName) +343
   Telerik.Sitefinity.Configuration.Data.XmlConfigProvider.LoadPropertyElement(ConfigElement element, XmlReader reader, ConfigPolicyHandler policyHandler, String policyName, UpgradingInfo upgradingInfo) +577
   Telerik.Sitefinity.Configuration.Data.XmlConfigProvider.LoadElement(ConfigElement element, XmlReader reader, ConfigPolicyHandler policyHandler, String policyName, UpgradingInfo upgradingInfo, Boolean isNew, Boolean validateTagName) +379
   Telerik.Sitefinity.Configuration.Data.XmlConfigProvider.LoadSectionFromReader(ConfigSection section, XmlReader reader, ConfigPolicyHandler policyHandler, String policyName, Boolean checkForUpgrade, UpgradingInfo& upgradingInfo) +340
   Telerik.Sitefinity.Configuration.Data.XmlConfigProvider.LoadSectionFromFile(ConfigSection section, ConfigPolicyHandler policyHandler, String policyName, Boolean withUpgrade) +138
   Telerik.Sitefinity.Configuration.Data.XmlConfigProvider.LoadSection(ConfigSection section, ConfigPolicyHandler policyHandler, String policyName) +82
   Telerik.Sitefinity.Configuration.ConfigSection.Initialize(ConfigProvider provider, ConfigPolicyHandler policyHandler, String policyName, Boolean singlePolicy) +194
   Telerik.Sitefinity.Configuration.ConfigSection.Initialize(ConfigProvider provider) +30
   Telerik.Sitefinity.Configuration.Config.Get(Boolean safeMode) +272
   Telerik.Sitefinity.Modules.Ecommerce.Catalog.CatalogModule.InstallDefaultProductTypes() +84
   Telerik.Sitefinity.Modules.Ecommerce.Catalog.CatalogModule.Initialize(ModuleSettings settings) +397
   Telerik.Sitefinity.Services.SystemManager.InitializeModule(ModuleSettings settings, InstallContext installContext, Boolean start) +573
   Telerik.Sitefinity.Services.SystemManager.Initialize() +1231
   Telerik.Sitefinity.Abstractions.Bootstrapper.RegisterRoutes(RouteCollection routes) +300
   Telerik.Sitefinity.Abstractions.Bootstrapper.Bootstrap() +386
   Telerik.Sitefinity.Web.SitefinityHttpModule.Init(HttpApplication context) +114
   System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +575
   System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +352
   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +407
   System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +375

[HttpException (0x80004005): No collection element matches the given key in a remove operation.]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +11686928
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +141
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +4863749

At this point I'm pretty much screwed and all development has ground to a halt until I get past this.  And while I backed up the solution, I didn't think to backup my database, so I can;t downgrade to get back to square one--not good.


Posted by Community Admin on 21-Dec-2011 00:00

Hi Stevev,

Thank you for posting your issues in the forums.

Lets try to examine what is causing the upgrade issue. From the first stack trace posted it seems that there is an assembly in your project referencing the old version of Sitefinity (Sitefinity 4.3 SP1). This can be caused by third party extensions, such as controls and modules from the Sitefinity Marketplace or from custom projects built by your team that reference the Sitefinity assemblies.

When you upgrade a project, the Sitefinity Project Manager will replace the previous version assemblies, with the new ones. This process is described in the Sitefinity Upgrade guide. Step 4 of the upgrade process describes what you have to do with third party extensions:

Select the project which you want to upgrade and click Upgrade button.
The selected project is upgraded to the latest version of Sitefinity Project Manager.

IMPORTANT: If your project is part of a larger solution where you have custom projects that reference Sitefinity assemblies, check the references to those assemblies in your project and make sure that they are referencing the newer assemblies.


Since your application cannot start up, due to unresolved references the database itself will not be upgraded. The upgrade of the database happens when you first run the project with the new assemblies. This is why you are not seeing updates in the Sitefinity configuration files. Once the website starts up and the upgrade process of the database is initiated Sitefinity will produce an upgrade log located in ~/App_Data/Stiefinity/Logs directory of your project. This log will tell you which components passed the upgrade process and if there are any failures. If there are failures, please do not touch the configuration files manually (this is also mentioned in the documentation: IMPORTANT: You must not manually change the Sitefinity version numbers stored in your configuration files.) Instead go over the upgrade trace log and the error log to determine why a component was not upgraded.

At the moment what you can do with third party extensions referring the old Sitefinity assemblies is to perform an assembly binding redirect in the web.config so that they know they need to use the new Sitefinity version. The binding redirect should look like the bellow configuration:

<runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
        <probing privatePath="bin;sitefinity\admin\bin" />
        <dependentAssembly>
            <assemblyIdentity
              name="Telerik.Sitefinity"
              publicKeyToken="b28c218413bdf563"
              culture="neutral" />
            <bindingRedirect
              oldVersion="4.3.1885.0"
              newVersion="4.4.2117.0" />
        </dependentAssembly>
    </assemblyBinding>
</runtime>

That being said if you continue having upgrade problems, please open up a support ticket and send us your project which fails the upgrade process. Please make sure to provide a list of steps you took to upgrade it. We will examine the project and see why it is failing the upgrade.

Greetings,
Radoslav Georgiev
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 21-Dec-2011 00:00

Hi Radoslav,

Thanks for the quick reply.  This project isn't using any third part components and all custom controls are contained in the main SF project so there are no other projects referencing older SF assemblies.  I have added only one dll reference which is essentially a utlity library with no dependancies to SF assemblies.  I restored my backup solution and tried the upgrade proceedure again.  This time, everything worked as expected.  The only difference is that I rebooted prior to running the Sitefinity Project Manager Upgrade.

Regarding the "Upgrade Guide";  Take a look at the 4.4 download page and the 4.4 release announcement email--there's no mention of an upgrade guide.  Yes, the download page has a link to an installation guide but SF was already installed on my computer so know how to install it.  From a user perspective I think it makes much more sense the include the guide in the download package rather than burying a link to it in the installation guide, particularly, if there are important steps that need to be carried out.  Clearly, I could have been more diligent in looking for this information but I would expect Telerik to be a bit more proactive making sure I have all the bits I need to upgrade the product.

One last comment; the Sitefinity Project Manager Upgrade process includes a warning regarding backing up the project before running the upgrade but make no mention of the database.  A warning that the database will be modified and should also be backed up would be helpful.

Thanks for the help--Steve

Posted by Community Admin on 21-Dec-2011 00:00

After adding a couple of Telerik controls from the VS toolbox, I no get the following exception when I attempt to build the solution:

Error   46  Assembly 'Telerik.Sitefinity, Version=4.4.2117.0, Culture=neutral, PublicKeyToken=b28c218413bdf563' uses 'Telerik.Web.UI, Version=2011.3.1115.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4' which has a higher version than referenced assembly 'Telerik.Web.UI, Version=2011.2.915.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4'   c:\Program Files (x86)\Telerik\Sitefinity 4.3\Projects\NLG Sitefinity Site\bin\Telerik.Sitefinity.dll   NLGSitefinityWebApp

Looking the the files in the bin folder of my upgraded project reveals that the Telerik.Web.UI.dll has the following version: 2011.2.915.40

Looking at a new 4.4 project the same file has version: 2011.3.1115.40

Copying the file over from the new 4.4 project to the upgraded project fixes the issue but should these files have been updated during the 43 to 4.4 upgrade?

Steve

Posted by Community Admin on 21-Dec-2011 00:00

If you have something in the solution which references Telerik.Web.UI, and has the "Copy Local" property set to true, it would have overwritten the newer 1115.40 version that comes with 4.4.  Perhaps that reference is pointing at the GAC and you have the Q2 2011 RadControls installed on your machine?

That'd be my guess anyway...

Like Radoslav said, there's something in your project that was built against the old assembly, thats the only reason you'd get that error.

Posted by Community Admin on 21-Dec-2011 00:00

Dear SteveV

For whatever reason when you rebuild a project you loose some DLLs and/or references. At least it happens to me and is a major pain in the  .... you know where.
What I usally do is create an empty 4.4 project. Copy all the DLLs over to my project and use only BUILD and NOT rebuild or clean.

Markus

Posted by Community Admin on 22-Dec-2011 00:00

Hi Steve,

If that's the case then wouldn't manually copying the newer version of the dll over the older one have resulted in the same problem.  In other words; if I did have something in my solution that references the older version of the Telerik.Web.UI and I overwrote the older version in my bin folder with the new version, I would expect the the older version would reappear after building the solution but It doesn't.  And as I indicated in a previous post I'm not using any third party components in the solution.  My guess is that something failed silently during the portion of the upgrade that copies over the new versions.

@ Marcus:

I've had this very annoying issue as well and have done the same as you to fix the problem.  I opened a support ticket on the disappearing dlls several weeks ago.  The ticket didn't result in much other than no-one else has reported this issue.  I included a post reference to at least one other person having the issue (don't think it was you).  So if you're seeing this I'd urge you to open a support ticket as well. 

Posted by Community Admin on 26-Dec-2011 00:00

Hi SteveV,

Do you have any custom or user controls, written by you, that might reference the old version of the assemblies? It doesn't have to be third party controls. You can open all .csproj files with a text editor and search for the string "1885" inside them - as if you references a specific version of an assembly it will be stored in plain text inside the .csproj file.

Kind regards,
Lubomir Velkov
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 26-Dec-2011 00:00

Hi Lubomir,

All of my custom controls are part of the website project so there'e only one .csproj file.  I searched for 1885 and got no results.  Searching for "Telerik.Web.UI" returns only one instance which looks like so:

<Reference Include="Telerik.Web.UI, Version=2010.2.929.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4, processorArchitecture=MSIL">
  <SpecificVersion>False</SpecificVersion>
  <HintPath>bin\Telerik.Web.UI.dll</HintPath>
  <Private>True</Private>
</Reference>

Thanks -- Steve

Posted by Community Admin on 28-Dec-2011 00:00

Hi Steve,

Could you try removing the version part from the reference and leave just

<Reference Include="Telerik.Web.UI">

All the best,
Lubomir Velkov
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

This thread is closed