NullReferenceException from NHibernate in a WCF Service
Don’t you hate it when you get an NullReferenceException? NHibernate 2.1.2 throws one if you have an WCF Service that accesses the NHibernate context. If you get one from NHibernate.Context.WebSessionContext.GetMap(), read on… It’s really simple but easy to forget – NHibernate’s web session models requires you to have HttpContext available. That particular mentioned method calls […]
December 21, 2010
· Jouni Heikniemi · 5 Comments
Tags: ASP.NET, NHibernate, WCF · Posted in: .NET