Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to accept connections from local network on Azure Functions (v2)?

I am trying to develop an @AzureFunctions using Xamarin Forms. But it is not accepting connections from the cell phone.

How to configure host, port of Azure Functions on Visual Studio 2017 to enable connections from * other than localhost connections?

How to accept connections from local network on Azure Functions (v2) ?

How to configure Host : Port of Azure Functions on Visual Studio 2017 ?

I want that it accepts like ASP.Net Core (.UseUrls("http://+:7071")):

Now listening on: http://[::]:7071

but it is only listening on

http://localhost:7071

Azure Functions host

GitHub Issue: How to configure Azure Functions (v2) listening Host / Domain ? https://github.com/Azure/azure-functions-core-tools/issues/537

like image 711
Tony Avatar asked Oct 17 '22 21:10

Tony


1 Answers

This was solved with the recent updates made on Azure Functions (v2).
Now the Azure Functions listens on IP 0.0.0.0

Hosting environment: Production
Content root path: C:\Users\tonyv\source\repos\SistemaMulti\WebAPI\bin\Debug\netstandard2.0
Now listening on: http://0.0.0.0:7071
Application started. Press Ctrl+C to shut down.

So we can just pick the computer IP address, for example http://192.168.15.16:7071/api/Ping, and use it and Azure Functions will respond on the LAN, as expected.

See https://github.com/Azure/azure-functions-core-tools/issues/537#issuecomment-399239887

like image 158
Tony Avatar answered Oct 20 '22 17:10

Tony