I am unable to connect to my Azure SQL Database from my website however I can connect to it with SSMS - database

I get this 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)
My connection string:
<add name="fxnzConnectionString"
connectionString="Server=tcp:fxnz.database.windows.net,1433;Initial Catalog=fxnz;Persist Security Info=True;User ID=xxxxxxxx;Password=vvvvvvvvv"
providerName="System.Data.SqlClient"/>

You need to grant Azure services access to your database.
Locate your server.
Click on "Show firewall settings"
Set "Allow Azure services and resources to access this server" to ON.

Related

error : provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server in conecting to aws rds via azure migration service

I am trying to migrate from aws rds to azure via DataMigration service of azure and typed in source SQL Server instance name db_name.cluster.us-east-1.rds.amazonaws.com:3306/schema and got the following error. I opened SQL ports in my computer and I am able to connect to this database.
The ERROR:
{ ** "errorType":"Failed to connect, please check error details", "errorDetail":"Error 53 - SQL connection failed.Please use this interactive user guide to troubleshoot the connectivity issue: https://support.microsoft.com/en-us/help/4009936/solving-connectivity-errors-to-sql-server 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)The network path was not found" }

Get access to SSMS in Home - A network-related or instance-specific error occurred

I already made some changes in Configuration Manager:
Change Built-in account to Local Service;
Enable all the protocols in SQL Server Network Configuration
And when I'm trying to access to the servername with windows authentication I'm getting the following error:
TITLE: Connect to Server
Cannot connect to *_DESKTOP_*.
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) (Microsoft SQL Server, Error: 2)
I run the command ipconfig/all and I get this:
What I should do next?
Thanks!

A network-related or instance-specific error occurred while establishing a connection to SQL Server. No SQL Express on server manager

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)
Anyone can help me with this? I am using SQL Management Studio 2012. I already tried opening sql server manager but I dont see any SQLEXPRESS server in there. Im just using localdb. Sorry guys im just a newbie in web development.
This is my connection string
add name="MyCon2"
connectionString="Server=Villar-PC\Justin;Database=DBNAME; Integrated Security=true;>
Run services.msc and check sql server (or express depending on what you have) service. It should be running. If not, start it and check.
Also check if the database you are mentioning exists
Edit: If you are using sql localdb, you can refer to http://www.asp.net/mvc/overview/getting-started/introduction/creating-a-connection-string for the connection string
<add name="MovieDBContext"
connectionString="Data Source=(LocalDB)\v11.0;AttachDbFilename=|DataDirectory|\Movies.mdf;Integrated Security=True"
providerName="System.Data.SqlClient"
/>

Connect to external SQL Server through Entity Framework

Basically I need to test a database on an external server (the model matches the model of my local test database).
Here is the connection string I have so far:
<connectionStrings>
<add name="DefaultConnection"
connectionString="Database=QualityLinkBuilder;Server=12.345.678.901.\SQLExpress;uid=RemotePc\Administrator;pwd=MyPassword;"
providerName="System.Data.SqlClient" />
</connectionStrings>
When I attempt to connect now I get the generic error:
The underlying provider failed on Open.
Inner exception message:
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)
It should be just Server=12.345.678.901\SQLExpress in your connection string ( replace "\SQLExpress" with the relevant SQL Server instance name on the external server )

provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified No fix?

I recently added a second site to my server. That site gives me the dreaded:
System.Data.SqlClient.SqlException: 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)
I have no idea why I am getting this. I've gone through this and this to no avail. This is a new MVC4 application I have at beta.vinformative.com in IIS 7. The other site is a MVC3 site at vinformative.com. It is running fine. Both of their databases have the exact same connection string and they are both on the same SQL server. I've given the same user mapping and role membership for NT Authority\Network Service to both databases.
Here is what I've tried so far:
MSSQLSERVER SQL Server service is running along with SQL Server Browser, and SQL Server Agent
I've added a firewall inbound rule for SQL Server browser
Made sure TCP/IP is enabled in sql server configuration
Added port 1433 TCP to the firewall
Enabled remote connection to db server
Successfully pinged the machine
Used portqry to see the db server on UDP 1434
I can connect to the site locally when I am remotely logged into my server. Furthermore, I have an ELMAH instance in the application for error logging and that is updating the database correctly. I feel like I am taking crazy pills because this should be working and I can't find an outright error. Please help!
Here is my connection string
<add name="vfContext" connectionString="Data Source=vinformative;Initial Catalog=vf3;Integrated Security=True" providerName="System.Data.SqlClient" />
Could be EF - see here.
Also, remote access cannot work with "Integrated Security=True" as far as I know, should use "User ID=******;Password=****;Integrated Security=False".

Resources