Reputation: 1
It's like my problem is that I can't access the database through my Blazor application that I've made. But if I write it to a Windows PC, I have no problems, but as soon as I'm on my Macbook pro, I have problems accessing the database.
The database is in Azure SQL Server. I've tried to look at how it could be that I can't access the database through my Mac, but I can if I access it through Windows.
Error:
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 26 - Error Locating Server/Instance Specified)
It's like the Blazor server app is built in EF, and I've checked several times to see if I've entered the correct information for the database with password, etc.
I have try to open terminal - its returning success!
nc -v xxxxx.database.windows.net 1433
Server=tcp:xxxx.database.windows.net,1433;Initial Catalog=sxxx;Persist Security Info=False;User ID=xxx;Password=xxxxxx;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;
This is my code for connection to the database: I have tried copying connection strings from ODBC and ADO.net on my database which is on Azure and both fail. And remove the old one which was on the website but then added the one which is from the Azure page.
Thus I also use EF (Entity Framework) to talk to my database. I have:
Microsoft Entity Framework Core design, + SQL design and tool
Upvotes: 0
Views: 34