question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Visual Studio 2019 .Net Core 3.1 Kestrel does not map default ControllerRoute

See original GitHub issue

This issue has been moved from a ticket on Developer Community.


I created a Core 3.1 MVC Web Application with VS2019. I changed nothing and tried different launcher options. IIS Express worked, Docker worked and the third option named like my project does not find the home controller.

When I start with IIS Express or Docker the start route looks like this:

https://localhost:51346/

Image:108722-iis-express.jpg

When I start with, I think it is called Kestrel, please correct me if I´m wrong:

https://localhost:5001/index.html

Image:108723-kestrel.jpg

the Startup.cs looks like this:

app. UseEndpoints(endpoints =>
{
   endpoints. MapControllerRoute(
     name: "default",
     pattern: "{controller=Home}/{action=Index}/{id?}");
   endpoints. MapRazorPages();
});

I search for a day now and even when I follow all the tutorials or create a new project it does not route to the home if not typed by hand. I tried different controller names, it`s the same, IIS and Docker work but not Kestrel.

I reinstalled Visual Studio because I know that it worked a week before, where I tried it the first time.

For me it looks like a bug, i´m not sure where to look elsewhere.


Original Comments

Visual Studio Feedback System on 12/9/2019, 03:37 AM:

We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.


Original Solutions

(no solutions)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:13 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
Tratchercommented, Dec 11, 2019

Yes, that looks like a browser redirect cache. Look at the details in the network tab when you do that.

0reactions
msftbot[bot]commented, Dec 12, 2019

This issue has been resolved and has not had any activity for 1 day. It will be closed for housekeeping purposes.

See our Issue Management Policies for more information.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Visual Studio 2019 .Net Core 3.1 Kestrel does not map ...
I created a Core 3.1 MVC Web Application with VS2019. I changed nothing and tried different launcher options.
Read more >
Asp.net core default route
The easiest way for me (and without using MVC) was to set the controller to default route using empty [Route("")] custum attribute like...
Read more >
Routing to controller actions in ASP.NET Core
Learn how ASP.NET Core MVC uses Routing Middleware to match URLs of incoming requests and map them to actions.
Read more >
Part 2, add a controller to an ASP.NET Core MVC app
The Model-View-Controller (MVC) architectural pattern separates an app into three main components: Model, View, and Controller.
Read more >
Handle errors in ASP.NET Core web APIs
Show 2 more. This article describes how to handle errors and customize error handling with ASP.NET Core web APIs.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found