I have an Azure VM with port 1433 endpoint created. The internal IP is 126.96.36.199.
In my Azure Standard Website Web.Config connstring if have:
I am getting the error:
[Win32Exception (0x80004005): Access is denied] [SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server.
See screenshot for more details:
If I change my connection string to the Public IP of my Azure Sql Server I am able to connection.
How can I used the Internal IP of my Sql Server VM in my Azure Website?
By default you can't. However, Azure websites now support running on a Virtual Network, so (in theory) you should be able to create a vnet and place both your SQL Server vm and the Azure Website on that vnet. That should enable you to connect to the db using the internal (vnet) ip address of the vm. I haven't tried this tho, so no guarantees.
User contributions licensed under CC BY-SA 3.0