Cannot connect to SQL Server on ASP.NET Core 1 EF7

asp.net-core asp.net-core-1.0 entity-framework-core sql-server

Popular Answer

I ran through a similar issue today. The seems to be. The connection string for Net Core to SQL Server has changed somewhat from earlier versions. Connection strings for Net SQL Server. Have you attempted using a device like the one in the outlined on this page of the MSDN Blog?:

using (var connection = new SqlConnection("Server=tcp:YourServer,1433;Initial Catalog=YourDatabase;Persist Security Info=True;"))

(Examples may be found if you scroll down the page to the "Relational databases" and "SQL Server" subheadings.)

You may also try the following if you are using username and password in the string:

"Server=tcp:yourservername,1433;Initial Catalog=yourdbname;User ID=yourusername;Password=yourpassword;"
2
1/22/2017 8:50:08 PM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow