EF recovery from invalidoperationexception caused by server being down

后端 未结 2 1299
無奈伤痛
無奈伤痛 2020-12-21 21:30

I had a windows service relying on EF, and it was running fine until the server went down. The problem was after the server went up again, it didn\'t fix itself and still t

2条回答
  •  猫巷女王i
    2020-12-21 22:17

    Solution described here worked for me, modify the connection timeout in your connection string

    FROM server='MySQLServer'';Integrated Security=true;Initial Catalog='EVConfiguration';Connection Timeout=100 TO server='MySQLServer';Integrated Security=true;Initial Catalog='EVConfiguration';Connection Timeout=0

提交回复
热议问题