MSSQL Error 'The underlying provider failed on Open'

前端 未结 30 2970
时光取名叫无心
时光取名叫无心 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:24

    I was searching all over the web for this problem. I had the wrong name in the connection string, please check you connection string in web.config. I had name="AppTest" but it should have been name="App".

    In my AppTestContext.cs file I had:

    public AppTestContext() : this("App") { }
    

    Wrong connection string:

    
    

    Right connection string:

    
    

提交回复
热议问题