Problem in application startup?

0

I have an ASP.NET MVC 5 application hosted on a dedicated server and at some times when the Application Pool is unused and IIS raises it on the first access I am getting the following error:

System.ArgumentException: Source array was not long enough. Check srcIndex and length, and the array's lower bounds.
   at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable)
   at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length)
   at System.Collections.Generic.List'1.set_Capacity(Int32 value)
   at System.Collections.Generic.List'1.EnsureCapacity(Int32 min)
   at System.Collections.Generic.List'1.InsertRange(Int32 index, IEnumerable'1 collection)
   at System.Collections.Generic.List'1.AddRange(IEnumerable'1 collection)
   at NHibernate.Event.EventListeners.InitializeListeners(Configuration cfg, Object[] list)
   at NHibernate.Event.EventListeners.InitializeListeners(Configuration cfg)
   at NHibernate.Cfg.Configuration.BuildSessionFactory()

The problem of this error that it does not occur often is one time or another and it is very difficult to figure out how to resolve it, when this error occurs when restarting the Application Pool it stops happening. p>     

asked by anonymous 28.07.2016 / 12:38

0 answers