I am working on my first ASP.NET Core MVC application.What is the right way to specify the connection string in a ASP.NET Core MVC application with a sql server backend requiring sql authentication?
ArgumentException: Keyword not supported: 'userid'.\
Below is my appsettings.json file. When I run the application, it throws an error.
{
"ApplicationInsights": {
"InstrumentationKey": ""
},
"ConnectionStrings": {
"DefaultConnection": "Server=myserver;Database=mydatabase;userid=id;password=mypwd"
},
"Logging": {
"IncludeScopes": false,
"LogLevel": {
"Default": "Debug",
"System": "Information",
"Microsoft": "Information"
}
}
}
User Id
is the correct way, with space in the middle
Server=myServerAddress;Database=myDataBase;User Id=myUsername; Password=myPassword;