1
votes

I have a new web app in Azure that im trying to connect to my on-premises SQL server and following the instructions on this link.

I have opened up our firewall and configured an IP address to route it through port 1433.

I have setup, in Azure a Biz Talk hybrid connection (i have set the host name to the IP address and said port) and the Connection manager has been installed locally.

I have set the following connection string in web.config

<add name="MyContext" providerName="System.Data.SqlClient" connectionString="Data Source=<IPADDRESS>\<SQLINSTANCE>,1433;Initial Catalog=MyCatalogue;
     Network Library=DBMSSOCN;User ID=<USER>;Password=<PASS>;MultipleActiveResultSets=True" />

I have confirmed that the said IP address is responding on port 1433

I am getting the following error [Win32Exception (0x80004005): No such host is known]

Can anyone help me please with what I might have missed

2
Have you tried porting you app as Cloud Service(with Remote)/VM (with Web Deploy) ? These options provide a way to troubleshoot connectivity from the Azure End. - Sri Kanth
Im getting an error now. Possibly as i have increased the logging. And now getting Access is Denied - Frazer
[Win32Exception (0x80004005): Access is denied] [SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. - Frazer
It has been confirmed that the internal network is correctly configured, so now looking at the Azure side, Im not very happy with my connection string at the moment. - Frazer

2 Answers

0
votes

Change your connectionString to "Server=IPADDRESS...."

0
votes

The first problem was that I wasn't using the Default SQL Server instance so corrected that.

I then had to address the database using the External IP address we setup not our private one, which according to the Azure documentation we didn't need, strange.

But i don't think the connection is using the Hybrid connection though and directly connecting to the DB