Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Custom error configuration setting

Custom error configuration setting

Scheduled Pinned Locked Moved ASP.NET
csharpasp-nethelparchitecturetutorial
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    A M SOMAN
    wrote on last edited by
    #1

    Hi, I am implementing error handling in my website developed in ASP.Net MVC & C#. To do this, I have set CustomErrors attribute in my web.config file as below customErrors mode="On" defaultRedirect="Error.aspx" This should ideally redirect user to default error page which is present in Views/Shared/Error.aspx. This bebavior was working perfetly untill I changed the base class of my controller classes. Earlier, the base class was "Controller" but for some internal logic, I changed it to ControllerBase and my ControllerBase is now inherited from Controller class. For example HomeController : ControllerBase { ... ... } ControllerBase : Controller { ... ... } But now when I run the application and some unhandled error occurs, the user is not redirected to Error.aspx any more. Instead it gives error page as below. Even if I set custom errors mode to "On". ---------------------------------------------------------------------- Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's configuration tag to point to a custom error page URL. ---------------------------------------------------------------------- Any help will be appreciated... Thanks Anil

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups