The underlying provider failed on open entity framework

前端 未结 3 1441
走了就别回头了
走了就别回头了 2021-01-20 02:29

I am unsing entity framework in my web application. Earlier everything was working fine. But then I deleted database from Sql Server. After that whenever I run the applicati

3条回答
  •  不思量自难忘°
    2021-01-20 02:50

    Can you show some details about connection string. I basically want to check the authentication you are using. Demo for setting a typical authentication : http://msdn.microsoft.com/en-us/library/ff649314.aspx

    Another possibility can be with connection pooling. Try explicitly closing the connection(if there are any open connections)

    db.Database.Connection.Close();
    

提交回复
热议问题