© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
1 reply
Krautzer

❔ MVC Error Handling

Hello, I am purposely getting a 403 error to test whether customErros is working. But the page I showed in custom erros does not appear. Instead, the page in the picture appears.
<customErrors mode="On" defaultRedirect="/Error/Error">
            <error statusCode="404" redirect="/Error/NotFound"/>
            <error statusCode="500" redirect="/Error/ServerError"/>
            <error statusCode="403" redirect="/Error/NotFound"/>
        </customErrors>
<customErrors mode="On" defaultRedirect="/Error/Error">
            <error statusCode="404" redirect="/Error/NotFound"/>
            <error statusCode="500" redirect="/Error/ServerError"/>
            <error statusCode="403" redirect="/Error/NotFound"/>
        </customErrors>

[HttpGet]
        public ActionResult Login()
        {
            return new HttpStatusCodeResult(403);
[HttpGet]
        public ActionResult Login()
        {
            return new HttpStatusCodeResult(403);

Do I need to see the Error/Not Found page?
Ekran_goruntusu_2023-10-01_175359.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

❔ MVC Error with DB
C#CC# / help
3y ago
✅ ASP.NET Core MVC error
C#CC# / help
3y ago
❔ MVC
C#CC# / help
3y ago