Can a precompiled Function App use Hybrid Connections to on-premise servers?
I can access the on-premise server using a C# script Function App function ...
using (var client = new HttpClient())
{
var result = await client.GetAsync("http://onpremisedev/dummywebapi/api/persons/1234");
string resultContent = await result.Content.ReadAsStringAsync();
data = resultContent;
But when I same C# code in a precompiled Function App function, I'm getting an exception that the server name can't be resolved ...
Exception while executing function: CallOnPremiseWebApi ->
An error occurred while sending the request. ->
The remote name could not be resolved: 'onpremisedev'
I've tried changing the server name to its FQDN, but no change.
Both Function App's are running in an App Service, i.e. not in Consumption plan
And the App Service has got the hybrid connection set-up to the on-premise server on port:80
How can the script version of the function resolve the on-premise name, but the precompiled version can't?