This operation requires a connection to the 'master' database

前端 未结 9 806
没有蜡笔的小新
没有蜡笔的小新 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:23

    I had this issue and in my case resolved it by adding "Integrated Security=True" to the connection string. This only applies if you're connecting to the DB using Windows Authentication. Hope it helps.

    0 讨论(0)
  • 2021-01-03 20:25

    This error happened to me and none of the above worked. Embarrassingly, I realised that I had missed out a semi-colon from the connection string. Might be useful...

    0 讨论(0)
  • 2021-01-03 20:27

    If you are working on windows authentication :

    • You can add "Integrated Security=True" to your connectionString.

    For user authentication:

    • You must add sql server authentication informations ("uid=YourUserName; Password=yourpassword;") to your connectionString.
    0 讨论(0)
提交回复
热议问题