NOTE: I posted this on sharp architecture google groups also.
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: SharpArch.Core.PreconditionException: A session factory has already been configured with the key of nhibernate.current_session
Source Error:
Line 49: base.Init(); Line 50: Line 51: NHibernateSession.Init(new WebSessionStorage (this), Line 52: new string[] { Server.MapPath("~/bin/ GCBA.Data.dll") }); Line 53: }
Source File: C:\Users\Matt\Desktop\Matt\GCBA\GCBA\GCBA.Web \Global.asax.cs Line: 51
Stack Trace:
[PreconditionException: A session factory has already been configured with the key of nhibernate.current_session]
SharpArch.Core.Check.Require(Boolean assertion, String message) in C:\MyStuff\Projects\SharpArchitecture\src\SharpArch\SharpArch.Core \DesignByContract.cs:62
SharpArch.Data.NHibernate.NHibernateSession.Init(ISessionStorage storage, String[] mappingAssemblies, AutoPersistenceModel autoPersistenceModel, String cfgFile, IDictionary`2 cfgProperties, String validatorCfgFile, IPersistenceConfigurer persistenceConfigurer) in C:\MyStuff\Projects\SharpArchitecture\src\SharpArch\SharpArch.Data \NHibernate\NHibernateSession.cs:70
SharpArch.Data.NHibernate.NHibernateSession.Init(ISessionStorage storage, String[] mappingAssemblies) in C:\MyStuff\Projects \SharpArchitecture\src\SharpArch\SharpArch.Data\NHibernate \NHibernateSession.cs:26
GCBA.Web.MvcApplication.Init() in C:\Users\Matt\Desktop\Matt\GCBA \GCBA\GCBA.Web\Global.asax.cs:51
System.Web.HttpApplication.InitInternal(HttpContext context, HttpApplicationState state, MethodInfo[] handlers) +335
This is the error I get trying to run from IIS7... I can run fine it seems out of VS2008 Cassini.... So I'm not certain what the issue is, I have the 7/16/2009 trunk build of S#arp and MVC.Net 1.0. The piece of code it is failing on is in the global.asax.cs Init() method. I really am pretty frustrated with this issue, because I have only found one other post concerning this, and it was in test cases, where as mine is actually trying to run the website from iis7 and all my tests pass fine.
If anyone has any idea what may be causing this issue, that would be great, thank you.