NHibernate thread safety with session

后端 未结 3 2080
有刺的猬
有刺的猬 2021-01-31 12:30

I\'ve been using NHibernate for a while now and have found from time to time that if I try to request two pages simultaniously (or as close as I can) it will occasionally error.

3条回答
  •  -上瘾入骨i
    2021-01-31 12:39

    The problem ended up being that my library for inversion of control was not managing the objects being created in HTTP context correctly so I was getting references for objects that should of not been available to that context. This was using Ninject 1.0, once I updated to Ninject 2.0 (beta) the problem was resolved.

提交回复
热议问题