Login

Username

Password





Register   Reset password

This is a read-only archive of the forum.

# tuantmyb 3/7/2007 1:30 AM
i run cuyahoga 1.5 web application but there is error:
Server Error in '/' Application.
Could not load file or assembly 'NHibernate, Version=1.0.2.0, Culture=neutral, PublicKeyToken=154fdcb44c4484fc' 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 'NHibernate, Version=1.0.2.0, Culture=neutral, PublicKeyToken=154fdcb44c4484fc' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Source Error:

Line 14: /// Constructor. The configuration is read from the web.config.
Line 15: /// </summary>
Line 16: public CuyahogaContainer() : base(new XmlInterpreter())
Line 17: {
Line 18: RegisterFacilities();


Source File: G:\Source\Cuyahoga-1.5.0-src\Web\Components\CuyahogaContainer.cs Line: 16

Assembly Load Trace: The following information can be helpful to determine why the assembly 'NHibernate, Version=1.0.2.0, Culture=neutral, PublicKeyToken=154fdcb44c4484fc' could not be loaded.

=== Pre-bind state information ===
LOG: User = TRANMANHTUAN\tuantmyb
LOG: DisplayName = NHibernate, Version=1.0.2.0, Culture=neutral, PublicKeyToken=154fdcb44c4484fc
(Fully-specified)
LOG: Appbase = file:///G:/Source/Cuyahoga-1.5.0-src/Web/
LOG: Initial PrivatePath = G:\Source\Cuyahoga-1.5.0-src\Web\bin
Calling assembly : Castle.Facilities.NHibernateIntegration, Version=1.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: G:\Source\Cuyahoga-1.5.0-src\Web\web.config
LOG: Using machine configuration file from C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\config\machine.config.
LOG: Post-policy reference: NHibernate, Version=1.0.2.0, Culture=neutral, PublicKeyToken=154fdcb44c4484fc
LOG: Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/Temporary ASP.NET Files/root/6cd811c9/b476519c/NHibernate.DLL.
LOG: Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/Temporary ASP.NET Files/root/6cd811c9/b476519c/NHibernate/NHibernate.DLL.
LOG: Attempting download of new URL file:///G:/Source/Cuyahoga-1.5.0-src/Web/bin/NHibernate.DLL.
WRN: Comparing the assembly name resulted in the mismatch: Build Number
ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.


Stack Trace:

[FileLoadException: Could not load file or assembly 'NHibernate, Version=1.0.2.0, Culture=neutral, PublicKeyToken=154fdcb44c4484fc' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)]
Castle.Facilities.NHibernateIntegration.NHibernateFacility.RegisterSessionManager() +0
Castle.Facilities.NHibernateIntegration.NHibernateFacility.RegisterComponents() +58
Castle.Facilities.NHibernateIntegration.NHibernateFacility.Init() +58
Castle.MicroKernel.Facilities.AbstractFacility.Init(IKernel kernel, IConfiguration facilityConfig) +63
Castle.MicroKernel.DefaultKernel.AddFacility(String key, IFacility facility) +212
Castle.Windsor.WindsorContainer.AddFacility(String key, IFacility facility) +53
Castle.Windsor.Installer.DefaultComponentInstaller.SetUpFacilities(IConfiguration[] configurations, IWindsorContainer container) +317
Castle.Windsor.Installer.DefaultComponentInstaller.SetUp(IWindsorContainer container, IConfigurationStore store) +62
Castle.Windsor.WindsorContainer.RunInstaller() +92
Castle.Windsor.WindsorContainer..ctor(IConfigurationInterpreter interpreter) +162
Cuyahoga.Web.Components.CuyahogaContainer..ctor() in G:\Source\Cuyahoga-1.5.0-src\Web\Components\CuyahogaContainer.cs:16
Cuyahoga.Web.Global.Application_Start(Object sender, EventArgs e) in G:\Source\Cuyahoga-1.5.0-src\Web\Global.asax.cs:41
Can you help me?
# martijnb 3/7/2007 2:24 AM
In the web.config there is an assembly redirect block for NHibernate from 1.0.2 to 1.0.4.
In the past I also had issues with this and the thing that fixed it was removing the xmlns attribute from the configuration tag in the web.config. Don't ask me why though :).