0

It's like this, I have moved my web app Blazor from Windows computer to Mac Pro m4

It's like that every time I try to create access to the database it gives me an error. It's like that I have tried to run the application on my previous version computer without any problems but as soon as I need to access the database I get problems that I can't in any way get permission to access the database.

I've searched around the net to see if I'm the only one who has this problem or not.

The only thing I've been able to find is that your IP should be added to the firewall. I can tell you that it's done and I've also made sure that it's there several times.

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)

I have try to open terminal: nc -v xxxxx.database.windows.net 1433. its giv me success.

I have tried copying Connection strings from ODBC and ADO.net on my database which is on Azure and both fail. And removed the old one which was on the website but then added the one which is from the Azure page.

No I am trying to connect to the database through my Blazor page. But it won't let me do it.

Server=tcp:xxxx.database.windows.net,1433;Initial Catalog=sxxx;Persist Security Info=False;User ID=xxx;Password=xxxxx;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30; 

thus I also use EF (entity framework) to talk to my database. I have:

microsoft entityframeworkcore design, + sqldesign and tool

1 Answer 1

0

Did you enable the TCP/IP protocol for connections to your instance?

Instructions from the above Microsoft docs:

Use SQL Server Configuration Manager

  1. In SQL Server Configuration Manager, in the console pane, expand SQL Server Network Configuration.

  2. In the console pane, select Protocols for <instance name>.

  3. In the details pane, right-click the protocol you want to change, and then select Enable or Disable.

  4. In the console pane, select SQL Server Services.

  5. In the details pane, right-click SQL Server (<instance name>), and then select Restart, to stop and restart the SQL Server service.

2
  • Thank you very much for your link / information. Can I also do this when I use Azure Database? As I said, I have never tried to do this before. So I am a little unsure of how to do it correctly. Commented Mar 2 at 8:39
  • thanks for u time, i have fix this error with serilog to connect string. Commented Mar 2 at 10:31

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.