we use NHibernate 2.2 as ORM in our project. Everything worked fine. But recently we have got strange mistakes. They occured periodically, but not every time(!) in different simple methods. we cannot determine exactly when and why...
The most common error messages are --
a)Invalid attempt to call Read when reader is closed
b)Invalid attempt to call MetaData when reader is closed
c)timeout expired.The timeout period elapsed prior to completion of the operation or the server is not responding
Actually there are another error messages but these are more frequeantly.
What can cause such exceptions ? is it Database(MsSql 2008 in our case) server problem ?
One of this methods.
Code:
site_user dbUser = SessionContext.CreateCriteria(typeof(site_user))
.Add(Expression.Eq("site_user_email", userEmail)).List<site_user>().FirstOrDefault();
return dbUser;
Should i provide any additional information ?
P.S. sorry for my bad english.