How can I programmatically recycle a .net web app's own apppool?

前端 未结 4 1697
故里飘歌
故里飘歌 2021-01-04 11:00

I have a complex server application that uses Nhibernate and Linq2SQL. About 3 times per day the Linq2sql code generates a \"value cannot be null\" exception. Once this happ

4条回答
  •  执笔经年
    2021-01-04 11:16

    I've had the exact same problem before; I should have blogged about it because now I can't remember the root cause.

    My gut tells me, it was one of the following:

    1. A context not getting disposed somewhere.
    2. Threading issue: make sure multiple threads can't access the same context.

    Or something along those lines. Just make sure you're using Linq2Sql correctly.

提交回复
热议问题