Could Not Load File or Assembly or One of its Dependencies Cause and ResolutionIssue
When you go to your website, you receive an error message similar to the following:
Server Error in '/' Application.
Could not load file or assembly 'SomeFile' 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.
Cause
This issue occurs when one of two things occurs:
- The file being referenced is not the correct version.
- The file is referencing a component that does not exist or is the wrong version.
Resolution
In order to resolve this issue, you will need ensure that the component being referenced is the correct version and all of its dependencies are present. A good starting point is to compare the file version of the erroring component to similar DotNetNuke websites and ensure that the file does exist and is the correct version. If you are receiving this error after installing or upgrading a third party module, you may need to contact your vendor for additional assistance.
Removing the offending file from the /BIN/ folder and placing it in a new folder ( /BIN_BAD/ ) may provide a temporary workaround to this issue and help you diagnose the problem.
Shared Hosting Account
- Log into your DNN site via FTP
- Navigate to Httpdocs > bin
- Locate the *.dll file in question (I am using the Telerik.Web.UI.DLL in this example)
- Download a copy of the file to your local machine
- Right click on the file you just downloaded and click Properties > Details
- Write down the product version (2011.03.1115.35 in my example)
- Open your web.config file
- Look for this code block
-
<
dependentAssembly
>
<
assemblyIdentity
name
=
"Telerik.Web.UI"
publicKeyToken
=
"121fae78165ba3d4"
/>
<!--Upgraded by DotNetNuke.Telerik.Web version 6.1.3 - Date: 4/13/2012 11:14:06 AM-->
<!--<bindingRedirect oldVersion="2008.0.0.0-2020.0.0.0" newVersion="2011.3.1115.35" xmlns="urn:schemas-microsoft-com:asm.v1" />-->
<
bindingRedirect
oldVersion
=
"2008.0.0.0-2020.0.0.0"
newVersion
=
"2011.3.1115.35"
/>
</
dependentAssembly
>
- The number in [ newVersion="2011.03.1115.35" /> ] should be the same number as the DLL you downloaded. If not change the web.config to match what version you have in the /bin folder.
Dedicated Server Account
- Use Remote Desktop to log into your dedicated server.
- Navigate to Httpdocs > bin folder
- Locate the *.dll file in question. (I am using the Telerik.Web.UI.DLL in this example.)
- Right click on the file you just located and click Properties > Details
- Write down the product version (2011.03.1115.35 in my example)
- Open your web.config file.
- Look for this code block
<
dependentAssembly
>
<
assemblyIdentity
name
=
"Telerik.Web.UI"
publicKeyToken
=
"121fae78165ba3d4"
/>
<!--Upgraded by DotNetNuke.Telerik.Web version 6.1.3 - Date: 4/13/2012 11:14:06 AM-->
<!--<bindingRedirect oldVersion="2008.0.0.0-2020.0.0.0" newVersion="2011.3.1115.35" xmlns="urn:schemas-microsoft-com:asm.v1" />-->
<
bindingRedirect
oldVersion
=
"2008.0.0.0-2020.0.0.0"
newVersion
=
"2011.3.1115.35"
/>
</
dependentAssembly
>
- The number in [ newVersion="2011.03.1115.35" /> ] should be the same number as the DLL you downloaded. If not change the web.config to match what version you have in the /bin folder.
Article ID: 357, Created: April 7, 2012 at 7:22 AM, Modified: August 25, 2014 at 2:37 PM