In *appsettings.json ` "ConnectionStrings": {
//Below commented string is working perfectly, Pointing my local machine.
//"Default": "Server=DESKTOP-GMHSAJV; Database=PhoneBookDemoDb; Trusted_Connection=True;"
// after pointing to server(115.XXX.XX.X9), it is not working.**
"Default": "Server=115.XXX.XX.X9; Database=PhoneBookDemoDb;User ID=sa;Password=xxxxxxxxxx;Trusted_Connection=True;"
}`
when I pass update-database command in pakage manager console PM>update-database
Gives below error : Error Number:18452,State:1,Class:14 Login failed. The login is from an untrusted domain and cannot be used with Windows authentication.
Can you please guid how to set server's database's connection string as default string.
3 Answer(s)
-
1
Hi,
Remove "Trusted_Connection=True;" from the connectionString, if you are not using Windows Authentication. Looks like you are using a SQL Server user to connect to the database.
-
0
can you connect that sql server with using ssms or one of visual studio sql server extension? That server may only accept Windows Authentication mode.
-
0
Hi Mr.Oaalvarado, I Removed "Trusted_Connection=True" and it is working, Thank you so much.
**Hi Mr. demirmusa , ** Sir I connecting it to SSMS. thanks