I have the following application deployed in an Azure app service
static void Main(string[] args)
{
SqlConnection con;
try
{
con = new SqlConnection(args[0]);
con.Open();
Console.WriteLine("Connection opened");
con.Close();
}
catch (Exception ex)
{
Console.WriteLine(ex.ToString());
}
}
The webapp is connected to a VNET that has a gateway to the an external network where the database is connected.
If I run this app against the database in the external DB, that it can not be reachable.
The connection string is OK.
The DB is working.
If I run this app in a VM also connected to the same VNET, it can reach the DB without problem.
tcpping works correclty.
Any idea about this? Some missing configuration?