June 2009 Entries

aspnet RoleProvider woes with StructureMap and NHibernate

I just fixed a bug that has plagued me for the last 2 nights. NHibernate was throwing completely random exceptions, rolling back transactions with no real consistency other than always happening on requests made after the application had started and almost always within my RoleProvider. I couldn’t figure out what the heck was happening. Some of the exceptions: “Could not synchronize database state with session” “Rollback failed - System.InvalidOperationException: This SqlTransaction has completed; it is no longer usable.” “Commit failed - System.NullReferenceException: Object reference not set to an instance...

posted @ Wednesday, June 24, 2009 11:06 PM | Feedback (2)