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 page unable to be displayed

Custom error page unable to be displayed

Scheduled Pinned Locked Moved ASP.NET
questioncsharpasp-netsysadminhelp
2 Posts 2 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.
  • K Offline
    K Offline
    KaKa
    wrote on last edited by
    #1

    I have created a custom error web page which is supposed to be displayed when the user tries to access an invalid page but instead of the custom error page appearing, the standard "Server Error in 'Error handling' application. The resource cannot be found" asp.net error page appeared instead. I edited the web.config file like this: customErrors mode="Off" defaultRedirect="PageNotFound.aspx" error statusCode="403" redirect="PageNotFound.aspx"/ error statusCode="404" redirect="PageNotFound.aspx"/ *I removed the tags because it seems that text within tags cant be displayed The custom page's name is PageNotFound.aspx. The default address of the website is: http://localhost:1351/Error handling When I tried to access a non existant web page like: http://localhost:1351/Error handling/lucky.aspx , only the standard error page appeared instead of the custom error page. How do I make the custom error page appear?:((

    E 1 Reply Last reply
    0
    • K KaKa

      I have created a custom error web page which is supposed to be displayed when the user tries to access an invalid page but instead of the custom error page appearing, the standard "Server Error in 'Error handling' application. The resource cannot be found" asp.net error page appeared instead. I edited the web.config file like this: customErrors mode="Off" defaultRedirect="PageNotFound.aspx" error statusCode="403" redirect="PageNotFound.aspx"/ error statusCode="404" redirect="PageNotFound.aspx"/ *I removed the tags because it seems that text within tags cant be displayed The custom page's name is PageNotFound.aspx. The default address of the website is: http://localhost:1351/Error handling When I tried to access a non existant web page like: http://localhost:1351/Error handling/lucky.aspx , only the standard error page appeared instead of the custom error page. How do I make the custom error page appear?:((

      E Offline
      E Offline
      Expert Coming
      wrote on last edited by
      #2

      Is the PageNotFound.aspx page at the base directory of the website? If you type this does it work? http://localhost:1351/Error handling/PageNotFound.aspx

      The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo

      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