© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
13 replies
Pibbles

❔ ASP .NET Core Controller Default Route Issue

I have a controller (TestController) with an Index action method.
The url I'm using is "localhost:8372/Test"
This returns a 404 error

If I add
[Route("[controller]")]
[Route("[controller]")]
the controller works as expected.

I just created the application but I thought that
[Route("[controller]")]
[Route("[controller]")]
was the default route. Is it not?
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

❔ Asp.NET Core Controller and View Problem
C#CC# / help
3y ago
Routing issue with ASP.Net Core
C#CC# / help
4y ago
❔ ASP.NET to .net Core
C#CC# / help
3y ago