Visual Studio: Web Server Unable to Listen on Port

Jana Rumpf 0 Reputation points
2024-11-25T17:26:54.3666667+00:00

Hello,

I am encountering an issue with Visual Studio running on a Microsoft Windows Server 2022 Datacenter Evaluation, hosted as a Hyper-V virtual machine. When starting my ASP.NET Core application, I get an error indicating that the web server cannot listen on the specified port.

Here’s what I’ve already checked:

  1. Firewall rules (both inbound and outbound) are correctly configured for the port.
  2. The port appears to be free, as verified using netstat.
  3. Visual Studio is running with administrative privileges.
  4. The issue persists whether using the default port settings or custom ports specified in the launchSettings.json.

Additionally:

  • The SQL Server database is accessible via the Server Explorer in Visual Studio.
  • It is also reachable through SQL Server Management Studio (SSMS).

Does anyone have suggestions on what could be causing this issue or how I might resolve it? Thanks in advance for your help!Hello,

I am encountering an issue with Visual Studio running on a Microsoft Windows Server 2022 Datacenter Evaluation, hosted as a Hyper-V virtual machine. When starting my ASP.NET Core application, I get an error indicating that the web server cannot listen on the specified port.

Here’s what I’ve already checked:

  1. Firewall rules (both inbound and outbound) are correctly configured for the port.
  2. The port appears to be free, as verified using netstat.
  3. Visual Studio is running with administrative privileges.
  4. The issue persists whether using the default port settings or custom ports specified in the launchSettings.json.

Additionally:

  • The SQL Server database is accessible via the Server Explorer in Visual Studio.
  • It is also reachable through SQL Server Management Studio (SSMS).

Does anyone have suggestions on what could be causing this issue or how I might resolve it? Thanks in advance for your help!

Thank you.

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,781 questions
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,445 questions
SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
14,483 questions
SQL Server Reporting Services
SQL Server Reporting Services
A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.
2,993 questions
Hyper-V
Hyper-V
A Windows technology providing a hypervisor-based virtualization solution enabling customers to consolidate workloads onto a single server.
2,819 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.