Reputation: 39
i got the error below when im trying to access my site hosted on Azure. Im using Database connectionString copied straight from the Database management panel on Azure but coudlnt connect successfully
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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)]
any ideas how to actually solve it? thanks
Upvotes: 1
Views: 1444
Reputation:
thanks for answer, but the solution was that i didn't notice the SQL database i was using was MySQL, and i was using
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
instead of
<provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6, Version=6.9.7.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
unfortunately errors didnt say anything about providers being not compatible ;>
btw, sorry, didnt notice i made a post with different account
Upvotes: 0
Reputation: 2094
You need to add your azure services or external IP address in a rule into to DB server firewall.
Follow these steps:
Upvotes: 1
Reputation:
the SQL is hosted on Azure, no i have not heard about setting up the IP based access rule, ill check this out
Upvotes: 0