SF 4.1 -> SP1 Error

Posted by Community Admin on 04-Aug-2018 02:56

SF 4.1 -> SP1 Error

All Replies

Posted by Community Admin on 16-May-2011 00:00

Every time I upgrade SF I get errors like this. Is there a better way to handle assembly bindings during/after an upgrade?


Server Error in '/' Application.

Could not load file or assembly 'Telerik.Sitefinity, Version=4.1.1339.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.1.1339.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.1.1339.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.1.1339.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.Reflection.RuntimeAssembly.GetType(RuntimeAssembly assembly, String name, Boolean throwOnError, Boolean ignoreCase, ObjectHandleOnStack type) +0
   System.Reflection.RuntimeAssembly.GetType(String name, Boolean throwOnError, Boolean ignoreCase) +146
   System.Web.UI.Util.GetTypeFromAssemblies(IEnumerable assemblies, String typeName, Boolean ignoreCase) +184
   System.Web.Compilation.BuildManager.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase) +600
   Telerik.Sitefinity.Utilities.TypeConverters.TypeResolutionService.GetType(String name, Boolean throwOnError, Boolean ignoreCase) +462
   Telerik.Sitefinity.Abstractions.VirtualPath.SitefinityPageResolver.BuildControls(PageData pageData, List`1 controlConatiners, CursorCollection placeHolders) +832
   Telerik.Sitefinity.Abstractions.VirtualPath.SitefinityPageResolver.RenderPage(StringBuilder output, PageData pageData, RequestContext context, String virtualPath) +308
   Telerik.Sitefinity.Abstractions.VirtualPath.SitefinityPageResolver.Open(PathDefinition definition, String virtualPath) +255
   Telerik.Sitefinity.Abstractions.VirtualPath.VirtualPathManager.OpenFile(String virtualPath) +231
   System.Web.UI.TemplateParser.ParseFile(String physicalPath, VirtualPath virtualPath) +256
   System.Web.UI.TemplateParser.Parse() +11168442
   System.Web.Compilation.BaseTemplateBuildProvider.get_CodeCompilerType() +135
   System.Web.Compilation.BuildProvider.GetCompilerTypeFromBuildProvider(BuildProvider buildProvider) +189
   System.Web.Compilation.BuildProvidersCompiler.ProcessBuildProviders() +265
   System.Web.Compilation.BuildProvidersCompiler.PerformBuild() +46
   System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) +580
   System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) +619
   System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) +203
   System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean throwIfNotFound) +189
   System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp) +56
   Telerik.Sitefinity.Web.PageRouteHandler.BuildHttpHandler(RequestContext requestContext) +892
   System.Web.Routing.UrlRoutingModule.PostResolveRequestCache(HttpContextBase context) +11335704
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +80
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +266


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1

Posted by Community Admin on 16-May-2011 00:00

Do you have a custom assembly that references 4.1.1339.0?

4.1 SP1 is a higher version so I would assume there's another assembly somewhere needing that?

Posted by Community Admin on 16-May-2011 00:00

That looks like it may be the ticket... I am using the Bytanium Image Rotator. The site must be loading the 4.1 SP1 dll and it references the 4.1 dll...

Will GACing the old dll solve this?

Posted by Community Admin on 16-May-2011 00:00

Appears I can't GAC the Telerik.SiteFinity.dll

And I can;t access the backend to remove the offending widget...

Posted by Community Admin on 16-May-2011 00:00

Have you tried using assmebly binding in the web config? That SHOULD work fine...

Posted by Community Admin on 16-May-2011 00:00

OK. I will give this a try - though I am new to this so any direction would be appreciated.

I think the 3rd party dll references a few SiteFinity dll's so does this mean I need to bind all the dll's to their newer counterparts?

Posted by Community Admin on 16-May-2011 00:00

Yeah, the binding essentially tells the component to use whatever version you tell it...so really not much should have changed in the API where it should work fine.

It'll look something like this

<runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
        <dependentAssembly>
            <assemblyIdentity name="Telerik.Web.UI" publicKeyToken="121fae78165ba3d4"/>
            <bindingRedirect oldVersion="0.0.0.0-65000.65000.65000.65000" newVersion="2011.1.315.40"/>
        </dependentAssembly>
        <dependentAssembly>
            <assemblyIdentity name="Telerik.OpenAccess" publicKeyToken="7CE17EEAF1D59342"/>
            <bindingRedirect oldVersion="0.0.0.0-65000.65000.65000.65000" newVersion="2011.1.411.2"/>
        </dependentAssembly>
    </assemblyBinding>
</runtime>

So you just need to set the newVersion to be whatever the 4.1 SP1 DLLs are at (1395 off the top of my head?), and put in the proper publicKeyToken, which you probably can get by searching the forums.

Good luck :)

There's enough of these threads every update it'd be nice if sitefinity gave the option on update to insert assembly bindings (or turn them on somewhere in the new .config backend.

Posted by Community Admin on 16-May-2011 00:00

I have tried this but I get a 500 error when I use the <runtime> element in my web.config

  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1" >
      <dependentAssembly>
        <assemblyIdentity name="Telerik.Sitefinity" publicKeyToken="b28c218413bdf563" culture="neutral"/>
        <bindingRedirect oldVersion="4.1.1339.0" newVersion="4.1.1395.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="Telerik.Sitefinity.Model" publicKeyToken="b28c218413bdf563" culture="neutral"/>
        <bindingRedirect oldVersion="4.1.1339.0" newVersion="4.1.1395.0" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>

Posted by Community Admin on 16-May-2011 00:00

It appears to be the <runtime> block which is causing the 500 error, as even with an empty <runtime> a 500 error occurs.

Thanks for your help Steve.

Posted by Community Admin on 16-May-2011 00:00

Where are you putting it?

It should go probably right above <system.web> (not IN system.web...above)

Posted by Community Admin on 16-May-2011 00:00

Bingo! I was putting <runtime> directly inside the <configuration> tag. Moving this to just above system.web solved teh 500 errors.

01.<runtime>
02.  <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1" >
03.    <dependentAssembly>
04.      <assemblyIdentity name="Telerik.Sitefinity" publicKeyToken="b28c218413bdf563" culture="neutral"/>
05.      <bindingRedirect oldVersion="4.1.1339.0" newVersion="4.1.1395.0" />
06.    </dependentAssembly>
07.    <dependentAssembly>
08.      <assemblyIdentity name="Telerik.Sitefinity.Model" publicKeyToken="b28c218413bdf563" culture="neutral"/>
09.      <bindingRedirect oldVersion="4.1.1339.0" newVersion="4.1.1395.0" />
10.    </dependentAssembly>
11.    <dependentAssembly>
12.      <assemblyIdentity name="Telerik.Web.UI" publicKeyToken="121fae78165ba3d4" culture="neutral"/>
13.      <bindingRedirect oldVersion="0.0.0.0-65000.65000.65000.65000" newVersion="2011.1.315.40" />
14.    </dependentAssembly>
15.  </assemblyBinding>
16.</runtime>

Now I get the following error, which doesn't make sense as the DLL (Telerik.WebUI.dll) is in the bin dir, and the versions are correct:

Server Error in '/' Application.

Could not load file or assembly 'Telerik.Web.UI' 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.Web.UI' 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.Web.UI' 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.Web.UI' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)]

[FileLoadException: Could not load file or assembly 'Telerik.Web.UI, Version=2011.1.315.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)]
   System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +0
   System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks) +567
   System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +192
   System.Reflection.Assembly.Load(String assemblyString) +35
   System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +118

[ConfigurationErrorsException: Could not load file or assembly 'Telerik.Web.UI, Version=2011.1.315.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)]
   System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +11392147
   System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +484
   System.Web.Configuration.AssemblyInfo.get_AssemblyInternal() +127
   System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +334
   System.Web.Compilation.BuildManager.CallPreStartInitMethods() +280
   System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +1087

[HttpException (0x80004005): Could not load file or assembly 'Telerik.Web.UI, Version=2011.1.315.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4' 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) +11524352
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +141
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +4782309


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1

Posted by Community Admin on 16-May-2011 00:00

For the Telerik.Web.UI try version

2011.1.413.40

Posted by Community Admin on 16-May-2011 00:00

That version worked - my fault, I misread the version in Explorer.

Thanks very much Steve, I can upgrade the production site now!

Posted by Community Admin on 16-May-2011 00:00

np

So would you also not agree that if SF had these bindings set on updates, it'd be a heck-of-a-lot easier when you have external components?

like a Bindings.config or nested in another system config somewhere...and when you update your site, part of the update is that the newVersion binding is changed automatically to the version you're updating to.

....would be awesomely handy telerik

Posted by Community Admin on 16-May-2011 00:00

I agree. I will submit a request in PITS.

It would be fairly easy to add to the end of an upgrade action in the project manager.

A bindings.config file in the Sitefinity/Configuration folder which sets the <runtime> block would be great.

Posted by Community Admin on 16-May-2011 00:00

Hi James and Steve,

We are actually looking forward to implement such bindings handling. This or similar idea would be implemented when we start working on the marketplace integration, but I won't tell more secrets :)

Regards,
Georgi
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