i've never work with castle windsor but did you register the ISessionFactory concrete type with the IoCContainer?
On Mon, Apr 19, 2010 at 5:04 PM, Bobby Fallaha <[email protected]>wrote: > Hey there, > > I am working on a web application and i am using NHibernate and > Windsor with APS.NET MVC and i am getting a run time error message: > > Can't create component 'MyProject.Models.PersonRepository' as it has > dependencies to be satisfied. > MyProject.Models.PersonRepository is waiting for the following > dependencies: > > Services: > - Castle.Facilities.NHibernateIntegration.ISessionManager which was > not registered. > > Here is how its my web.config file looks like: > > <hibernate-configuration xmlns="urn:nhibernate-configuration-2.2"> > <session-factory> > <property name="connection.provider"> > NHibernate.Connection.DriverConnectionProvider > </property> > <property name="connection.driver_class"> > NHibernate.Driver.SqlClientDriver > </property> > <property name="connection.connection_string"> > Server=.\SQLEXPRESS;Initial > Catalog=test;UID=user;PWD=password;Connect Timeout=3600; > </property> > <property name="dialect"> > NHibernate.Dialect.MsSql2005Dialect > </property> > <property name="show_sql"> > true > </property> > <property name='proxyfactory.factory_class'> > NHibernate.ByteCode.Castle.ProxyFactoryFactory, > NHibernate.ByteCode.Castle > </property> > <property name="adonet.batch_size">16</property> > </session-factory> > </hibernate-configuration> > > The exception is throw from the windsor controller factory when trying > to create the controller: > > public IController CreateController(RequestContext requestContext, > string controllerName) > { > return > _kernel.Resolve<IController>(controllerName.ToLowerInvariant() + > "controller"); > } > > > what could possible cause this issue? > > -- > You received this message because you are subscribed to the Google Groups > "nhusers" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<nhusers%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/nhusers?hl=en. > > -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
