Port 7071 is unavailable. Close the process using that port, or specify another port using --port [-p]

visibility 1,176 access_time 9 months ago languageEnglish
Port 7071 is unavailable. Close the process using that port, or specify another port using --port [-p]

When developing Azure Functions with .NET 5 in Visual Studio 2019, the following error pops out:


Port 7071 is unavailable. Close the process using that port, or specify another port using --port [-p].

The cause of the error is obvious: the default port is unavailable either because of firewall settings or used by another program. Thus to fix the problem, the easiest approach is to change the default port.

Change the default port

For the latest Visual Studio 2019, the integration with Azure Functions with .NET 5 is not great based on my experience and I could not directly change the Application Arguments to make it work.

Thus, I've used command line to run the function locally with port specified via argument --port:

func host start --verbose --port 11000
copyright This page is subject to Site terms.

Please log in or register to comment.

account_circle Log in person_add Register

Log in with external accounts

timeline Stats
Page index 4.65
More from Kontext
C# 10.0 New Features
visibility 189
thumb_up 0
access_time 10 months ago
C# 10.0 New Features
Draw Images in ASP.NET Core 5
visibility 2,120
thumb_up 0
access_time 2 years ago
Draw Images in ASP.NET Core 5