Trying to use SQL dependency in a .NET 4.7 Azure Web Application against an on premise SQL server (not an Azure SQL db) via a hybrid connection with SQL Authentication. Everything works running locally on dev system and in other environments within our network, but not when deployed to an Azure Web App Service.
When this code is called in the Global.asax.cs, Application_Start()
SqlDependency.Start("SomeConnectionString");
It throws the error :
[ArgumentException: connectionString]
System.Data.SqlClient.SqlDependency.Start(String connectionString, String queue, Boolean useDefaults) +493
MyWebApplication.Application_Start() +661[HttpException (0x80004005): connectionString]
System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +517
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +185
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +168
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +277
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +369[HttpException (0x80004005): connectionString]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +532
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +111 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +714