This blog is intended as a personal reference and a way of reinforcing knowledge gained through experience.
Thursday, July 9, 2009
CurrentSessionContext call results in "No current session context configured."
Well, I was playing with NHibernate today and trying to create a single session in a windows application that would stay open till I was ready to close it. I was using CurrentSessionContext.Bind(someSession) when I generated this error: "No current session context configured." After some searching around, I discovered that I was missing a line in my Hibernate.cfg.xml file.