Custom error pages not displaying

Discussion in 'Windows / IIS' started by Djackson0075, Mar 22, 2013.

  1. Hello... my site is using- IIS 8.0

    I have created custom error pages and have the following code in the webconfig file below. However, after creating an error of file type 404, a file not found error is still handled by the ASP.net site's error page.

    <system.web>

    <customErrors mode="On" defaultRedirect="/errors/error.htm">
    <error statusCode="404" redirect="/errors/error404.aspx"/>
    </customErrors>

    </system.web>


    Thanks for help!
     
  2. Reply to self

    Never mind.. I fixed it with ~/ in the past (duh)
     
  3. mjp

    mjp

    Glad you figured it out. It's always the little things, isn't it.
     
  4. martino

    martino DiscountASP.NET Staff

    Thanks for posting how you fixed it too :)
     

Share This Page