Have you checked that the file log4net.dll was uploaded correctly? /Oskar
2009/10/13 thaianhduc <anhduc.t...@gmail.com>: > > Does anyone have clue about this one? > > I have 2 projects, one for domain model and one for web. I have a > class to take care of initialize NHibernate and Session in site domain > model assembly. Everything worked perfectly in localhost. However when > i uploaded the code to server. I got this exception: > > Could not load file or assembly 'log4net, Version=1.2.10.0, > Culture=neutral, PublicKeyToken=1b44e1d426115821' or one of its > dependencies. The module was expected to contain an assembly manifest. > 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.BadImageFormatException: Could not load file > or assembly 'log4net, Version=1.2.10.0, Culture=neutral, > PublicKeyToken=1b44e1d426115821' or one of its dependencies. The > module was expected to contain an assembly manifest. > > 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 'log4net, Version=1.2.10.0, > Culture=neutral, PublicKeyToken=1b44e1d426115821' 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: > > [BadImageFormatException: Could not load file or assembly 'log4net, > Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821' or > one of its dependencies. The module was expected to contain an > assembly manifest.] > NHibernate.Cfg.Configuration..cctor() in c:\CSharp\NH\nhibernate\src > \NHibernate\Cfg\Configuration.cs:1052 > > [TypeInitializationException: The type initializer for > 'NHibernate.Cfg.Configuration' threw an exception.] > NHibernate.Cfg.Configuration..ctor() in c:\CSharp\NH\nhibernate\src > \NHibernate\Cfg\Configuration.cs:264 > Tbf.Domain.NHManager.get_SessionFactory() in D:\projects\tbf\code > \Tbf.Domain\NHManager.cs:21 > Tbf.Domain.NHManager.get_Session() in D:\projects\tbf\code > \Tbf.Domain\NHManager.cs:34 > Tbf.Domain.Business.CategoryRepository.GetAll() in D:\projects\tbf > \code\Tbf.Domain\Business\CategoryRepository.cs:36 > TbfWeb.Admin.ManageCategory.Page_Load(Object sender, EventArgs e) > in D:\projects\tbf\code\TbfWeb\Admin\ManageCategory.aspx.cs:16 > System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, > Object o, Object t, EventArgs e) +14 > System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object > sender, EventArgs e) +35 > System.Web.UI.Control.OnLoad(EventArgs e) +99 > System.Web.UI.Control.LoadRecursive() +50 > System.Web.UI.Page.ProcessRequestMain(Boolean > includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) > +627 > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to nhusers@googlegroups.com To unsubscribe from this group, send email to nhusers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nhusers?hl=en -~----------~----~----~----~------~----~------~--~---