MSSQL Error 'The underlying provider failed on Open'

前端 未结 30 2980
时光取名叫无心
时光取名叫无心 2020-11-22 09:51

I was using an .mdf for connecting to a database and entityClient. Now I want to change the connection string so that there will be no

30条回答
  •  谎友^
    谎友^ (楼主)
    2020-11-22 10:27

    I had a similar issue with exceptions due to the connection state, then I realized I had my domain service class variable marked as static (by mistake).

    My guess is that once the service library is loaded into memory, each new call ends up using the same static variable value (domain service instance), causing conflicts via the connection state.

    I think also that each client call resulted in a new thread, so multiple threads accessing the same domain service instance equated to a train wreck.

提交回复
热议问题