Explore Courses Blog Tutorials Interview Questions
0 votes
in Azure by (13.1k points)

I was trying to connect to SQL server using my Web application and I want to write to the database. But every time it throws an 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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

Can anyone help me with this?

1 Answer

0 votes
by (26.7k points)

In able to access your SQL Server you need to allow Azure services in able to do that, follow these steps:

- First, navigate to firewalls and Virtual network of your SQL Server.

- After that, turn on "Allow Azure Services and resources" in able to access this server to "Yes".

- Then save all your changes.

After that, you can able to Access your SQL Server.

I hope this will help.

Want to become an Azure expert? join azure developer certification now!!

Want to know more about Azure SQL? Watch this video on Deploy SQL Database in Azure | Azure SQL :

Browse Categories