Fresh C# ASP.NET Core Web Api project on VS returns ERR_EMPTY_RESPONSE upon entering the localhost of the instanced solution.

Mar 5 Reputation points
2026-06-29T20:52:06.5833333+00:00

That's... Really it, tbh.

I'm using Visual Studio Community Edition 2026, in Windows 11 Home Single Language,
The Visual Studio is a fresh installation that the only thing I really modified of it is the default language in installation. Everything else is as it should be for a recent VS installation.

Aditional VS packages installed:

  • ASP.NET and Web Development
  • Desktop .NET Development
  • Data storage and processing

Currently using Helium browser, but tried Brave and Chrome browser as well and got no result from it.

And repairing my VS installation didn't work either, nor disabling my firewall.

And... That's all the info I can think of that could be useful. I'm willing to provide more information if needed. Thank you for reading.

Developer technologies | ASP.NET Core | ASP.NET API

4 answers

Sort by: Most helpful
  1. AgaveJoe 31,361 Reputation points
    2026-06-30T09:52:17.74+00:00

    It sounds like there might be a misunderstanding of how ASP.NET Core Web APIs function, which is likely contributing to your confusion.

    First, a Web API does not have a UI. If you are navigating to the root URL in a browser, you should expect a 404 (Not Found) error unless you have explicitly configured a landing page or integrated API documentation like Swagger/OpenAPI. Attempting to 'see' the API in a browser this way isn't a valid test of an API endpoint.

    Second, for anyone here to actually help you troubleshoot this, you need to provide more than just the symptoms. Please provide:

    The specific error message you see in the Visual Studio Output window (not just the browser).

    Your launchSettings.json file content, to ensure the ports and profiles are configured correctly.

    Steps to reproduce: Are you using Kestrel or IIS Express? Have you tried running the project directly from the CLI using dotnet run?

    Without this technical context, it is impossible to determine if this is a configuration issue, a port conflict, or a faulty installation.

    Was this answer helpful?

    0 comments No comments

  2. Damien Pham (WICLOUD CORPORATION) 1,755 Reputation points Microsoft External Staff Moderator
    2026-06-30T04:23:55+00:00

    Hello @Mar ,

    a new ASP.NET Core Web API project should start and listen on localhost, and the default sample endpoint should respond normally. Microsoft’s Web API tutorial notes that the template listens on https://localhost:<port> and http://localhost:<port>, and that testing the sample endpoint such as /weatherforecast should return JSON rather than an empty browser response (Create a controller-based web API with ASP.NET Core).

    Because you are getting ERR_EMPTY_RESPONSE instead, I would focus on the local startup path rather than the browser. First, try running the project with Ctrl+F5 and also with dotnet run from the project folder. If the app fails during startup, the terminal or Visual Studio Output window should show the actual exception. Second, if you are launching an HTTPS profile, re-create and trust the development certificate with dotnet dev-certs https --clean followed by dotnet dev-certs https --trust, then close all browser windows and try again, which is the Microsoft guidance for certificate-trust issues on Windows (Trust the ASP.NET Core HTTPS development certificate, Windows certificate troubleshooting).

    I would also check the active launch profile in Visual Studio. For ASP.NET Core, Microsoft recommends verifying that the selected https, project, or IIS Express profile has the expected URL values in launchSettings.json, and that the profile’s App URL and App SSL URL are correct for the port being opened (Debug ASP.NET Core apps in Visual Studio).

    If it still fails after that, please share the exact message shown in the Output window or from dotnet run, because that will usually identify whether this is a certificate problem, a launch-profile mismatch, or the app process exiting during startup.

    I hope this helps. If you found my response helpful or informative, I would greatly appreciate it if you could follow this guidance or provide feedback.     

    Thank you.     

     

    Was this answer helpful?


  3. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  4. AI answer

    2026-06-29T20:52:23.6966667+00:00

    ERR_EMPTY_RESPONSE when browsing https://localhost:<port> for a fresh ASP.NET Core Web API project usually indicates that the app process is failing to start or is immediately crashing, so the browser gets no HTTP payload back.

    Use these steps to narrow it down:

    1. Run without debugging from Visual Studio
      In Visual Studio, press Ctrl+F5 to run the app without the debugger.
      • If the browser still shows ERR_EMPTY_RESPONSE, check whether Visual Studio shows any error dialog or output in the Output window.
      • If the app starts and shows a default page or Swagger UI, the issue is likely with the debug profile.
    2. Check the URL and port
      When Visual Studio runs a web project, it uses localhost:<port> with a random port number. Confirm that the browser is using the same URL and port that Visual Studio shows in the run/debug toolbar.
      If the app is configured for HTTPS, use the https profile/button in the toolbar, as shown in the ASP.NET Core MVC tutorial.
    3. Trust the HTTPS development certificate (if using HTTPS)
      For HTTPS profiles, an untrusted dev certificate can cause startup or browser issues.
      • When running from Visual Studio the first time, accept the dialogs to trust the IIS Express / ASP.NET Core development certificate, similar to the dialogs shown in the MVC tutorial.
      • If using dotnet CLI (for example, from Visual Studio Code), run:
             dotnet dev-certs https --trust
        
        and accept the certificate trust dialog.
    4. Try a different browser
      Since ERR_EMPTY_RESPONSE is a browser-level error, test with another browser to rule out browser-specific issues.
    5. Run the project manually
      Open Terminal in Visual Studio and run the project with dotnet run from the project folder.
      • If the app writes a URL like https://localhost:<port>, Ctrl+click that URL to open it.
      • If the app crashes, the console output should show an exception or error message that explains why the process is stopping.
    6. Check IIS Express / ASP.NET Core hosting
      If the project is using IIS Express:
      • Reset IIS Express configuration as suggested in the Visual Studio Q&A answer (delete the IIS Express config folder and let it regenerate).
      • Reinstall IIS Express if needed and restart the machine.
        These steps are known to fix cases where Visual Studio can’t successfully start a local web app.
    7. Repair Visual Studio
      If none of the above helps, open Visual Studio Installer, select the installed Visual Studio 2026 Community instance, and choose Repair. This can fix broken debug/run behavior for new projects.

    Once the app process is starting correctly, browsing https://localhost:<port> should return either the default API response (for a minimal API) or the default page/Swagger UI, rather than ERR_EMPTY_RESPONSE.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

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