I do ManagedWebSessionContext.Bind() in the Application_BeginRequest event of the Global.asax, and I do ManagedWebSessionContext.Unbind() in Application_EndRequest.
Is this what you meant ? So why is it not working if I use 'web' ? On 24 avr, 17:26, Fabio Maulo <fabioma...@gmail.com> wrote: > Correct!! and I hope you are using manual Bind & Unbind in your webModule, > right ? > > 2009/4/24 graphicsxp <graphic...@googlemail.com> > > > > > > > Hi, > > > I'm trying to integrate nhibernate with asp.net. I want to create and > > open the session on the Begin_Request event in the global.asax file. > > > It works if I set the current_session_context_class to 'managed_web'. > > However If I set it to 'web', then I get the error No session bound to > > the current context, when trying to call GetCurrentSession(). > > > I'm using NHibernate 2.0, so I thought I should use 'web' (in > > NHibernate in action it says that 'managed_web' is deprecated since > > version 1.2).... > > > which one is correct ? > > -- > Fabio Maulo --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---