SF 4.1 -> SP1 Error
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
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?
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?
Appears I can't GAC the Telerik.SiteFinity.dll
And I can;t access the backend to remove the offending widget...
Have you tried using assmebly binding in the web config? That SHOULD work fine...
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?
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
>
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
>
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.
Where are you putting it?
It should go probably right above <system.web> (not IN system.web...above)
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>
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. |
|
|
For the Telerik.Web.UI try version
2011.1.413.40
That version worked - my fault, I misread the version in Explorer.
Thanks very much Steve, I can upgrade the production site now!
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
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.
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,