Web App Builds But Only Shows Default ASP.NET Page – Why?

Bohlale Masha 20 Reputation points
2025-04-09T13:37:47.0433333+00:00

Hi everyone,

I’m currently working with an existing on-premise ASP.NET Web API application. I opened the solution in Visual Studio, and it builds and runs without errors. However, when I run the application, it shows the default ASP.NET landing page instead of loading the actual application. How can I make the project load the intended application interface instead of the default ASP.NET welcome screen. Any help would be greatly appreciated!

ASP.NET API
ASP.NET API
ASP.NET: A set of technologies in the .NET Framework for building web applications and XML web services.API: A software intermediary that allows two applications to interact with each other.
420 questions
0 comments No comments
{count} votes

Accepted answer
  1. Michael Taylor 58,701 Reputation points
    2025-04-09T13:59:58.9066667+00:00

    Providing us an example of what you're seeing and what you expect would be useful here. We have no idea what you mean by ASP.NET Welcome screen. If you created a standard MVC web application then its index.html/default.html page contains some basic information. It is this HTML page that will be shown when the site runs. If you want different content then you need to update the default page to contain that content, change the default page (not recommend) that is loaded by the server, or redirect to the page you care about. Updating the default page is the standard/recommended approach.

    You tagged this with ASP.NET API. If you're building a web API project then there is likely no UX (views) at all. In this case you can just add a default.html page to your site, under wwwroot if you're using ASP.NET Core, and the server will show it by default. This is commonly done to provide basic information about the API.

    If you're using OpenAPI/Swagger for your API then you'd need to add the necessary middleware, assuming ASP.NET Core, to have it auto-generate the OpenAPI UX. Then you'd need to set your startup page to be the URL to the OpenAPI UX. This is generally done in the launchsettings.json file. For the actual site, when hosted on a web server, you'd want to add a redirect in your startup code.

    0 comments No comments

0 additional answers

Sort by: Most helpful

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.