© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•2y ago•
1 reply
nox7

How Can I Debug ASP Core Controller Registered, but Not Matching?

I have started a basic ASP Core MVC project in VS. Set up a basic test controller, and visited the endpoint; but I get a 404 response status page instead. (Screenshot of ASP Debug logs attached)

How can I further debug why my controller is registered (being found with AddControllers/MapControllers) but not being selected?

Controller code is below. Screenshots of outputting the app's known controller classes attached.
using Microsoft.AspNetCore.Mvc;

namespace StripeWebhookHost.Controllers
{
    public class TestController : Controller
    {
        [HttpGet]
        public IActionResult Test()
        {
            return Content("Hello");
        }
    }
}
using Microsoft.AspNetCore.Mvc;

namespace StripeWebhookHost.Controllers
{
    public class TestController : Controller
    {
        [HttpGet]
        public IActionResult Test()
        {
            return Content("Hello");
        }
    }
}
image.png
image.png
image.png
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 bin vs bin/debug
C#CC# / help
15mo ago
❔ Asp.NET Core Controller and View Problem
C#CC# / help
3y ago
❔ ASP .NET Core Controller Default Route Issue
C#CC# / help
3y ago
ASP NET Core default DI-Container, how pass in constructor not-registered parameter? [Answered]
C#CC# / help
4y ago