This operation requires a connection to the 'master' database

前端 未结 9 812
没有蜡笔的小新
没有蜡笔的小新 2021-01-03 19:28

I have suddenly started getting an error in my application.

The error is:

This operation requires a connection to the \'master\' database. Una

9条回答
  •  渐次进展
    2021-01-03 20:14

    Hello actually this problem persist if you are trying to make changes in the schema like creating the table or altering some object...

    And you don't have privileges to do that..

    If you are working with MVC and your database already exit in the server than this problem can be solved with the code

    Database.SetInitializer(null);
    

    just add this code in the Global.asax file in the application_start Event method.

提交回复
热议问题