2
votes

I'm having trouble connecting to a SQL Database hosted on Azure, via a WCF Service I created. I got the connection string from Azure itself by clicking on the link.

Things i have done:

  1. Added the Public IP of my WCF service to the firewall settings of my Database Server.
  2. Allowed access to Azure Services
  3. Tried Connecting to the SQL Server via VS2015 by clicking on Tools>Open in Visual Studio

Here is my ADO.NET(SQL authentication) Connection string if it helps:

Server=tcp:thebutlrserver.database.windows.net,1433;Data Source=thebutlrserver.database.windows.net;Initial Catalog=btlrDB;Persist Security Info=False;User ID=******;Password=******;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=120;

The Error I'm getting is:

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)

1
are you facing this issue consistently or at times ?TheGameiswar
did you verify that you can resolve the server DNS ?Aravind
@TheGameiswar - This is the first time Ive tried setting things up.Gys Rademeyer
@Aravind - Im not sure how to Accomplish that.Gys Rademeyer
@gys see if you are able to ping that server and also see if you can telnet to that vm on 1433 port.Aravind

1 Answers

2
votes

Hi all i was able to fix this issue by Going to Uninstall or change a program> Turn Windows features on or off> en just enabling everything