+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Custom Error Pages With SF 8

Custom Error Pages With SF 8

7 posts, 1 answered
  1. Steven
    Steven avatar
    8 posts
    Registered:
    15 Nov 2014
    12 Aug 2015
    Link to this post

    Hi,

     Trying to create a custom 404 error page initially, (others will follow) and I have been trying to follow this article here: 

    http://docs.sitefinity.com/administration-custom-error-pages#change-the-response-status-of-the-custom-error-page 

    I have also digested this article and still no luck:

    http://www.benramey.com/2012/10/12/custom-error-pages-with-sitefinity/ 

    However so far all I keep getting is a blank white page when I type http://domain.com/SomeRandomLetters, does anyone know why this may be?

    I have noticed historical posts linked to SF 5&6 that also had issues with extensionless URL's and I am keeping this in mind however we are hosting on Azure so IIS settings wont play apart in this and I have tried both with & without an extension. 

    Lastly I am trying to use published SF pages to be the custom 404 pages and not just a .html or .aspx page.

    I have followed the above post but with no luck.

     My pages are:

    ~/error-pages/404 (404 custom error page)

    ~/error-pages/error (Default fall back page)

    NOTE: extensionless pages.

    Any pointers to a post or article that may get me back on track appreciated?

  2. Steven
    Steven avatar
    8 posts
    Registered:
    15 Nov 2014
    14 Aug 2015
    Link to this post

    #Nudge

    I guess what I have tried should work? I have exhausted all my options I feel, anyone have any other ideas, links or advice?

  3. Nikola Zagorchev
    Nikola Zagorchev avatar
    424 posts
    Registered:
    08 Dec 2016
    17 Aug 2015
    Link to this post
    Hello Steven,

    You can serve the error page as a page from Sitefinity. For instance, whether the error page for 404 is under errorpages -> 404, you can set the web config the following:
    <httpErrors errorMode="Custom" defaultResponseMode="Redirect">
          <remove statusCode="404" subStatusCode="-1" />
          <error statusCode="404" prefixLanguageFilePath="" path="/ErrorPages/404" responseMode="ExecuteURL" />
        </httpErrors>

    You can also set the custom errors using the IIS manager, setting html pages. You can find more information here.
    Another option is to handle the errors in the Global Application class - Application_Error and redirect to the error page.


    Regards,
    Nikola Zagorchev
    Telerik
     
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
     
  4. Steve
    Steve avatar
    3 posts
    Registered:
    12 Nov 2014
    18 Aug 2015 in reply to Nikola Zagorchev
    Link to this post

    Hi Nikola,

    Thanks for the response, I already have the following in the web.config:

     Under <system.web>

    <customErrors mode="RemoteOnly">
      <error statusCode="404" redirect="error-pages/404" />
    </customErrors>

     Under <system.webServer>

    <httpErrors errorMode="Custom">
      <clear />
      <remove statusCode="404" subStatusCode="-1" />
      <error statusCode="404" path="/error-pages/404" responseMode="ExecuteURL" />
    </httpErrors>

     However, I am using Azure not  IIS environment.

    SF Support have provided a possible solution that I will be looking at this afternoon.
    I will post my solution if successful.

  5. Nikola Zagorchev
    Nikola Zagorchev avatar
    424 posts
    Registered:
    08 Dec 2016
    20 Aug 2015
    Link to this post
    Hello Steve,

    Feel free to share with the community resolution information from the ticket.

    Regards,
    Nikola Zagorchev
    Telerik
     
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
     
  6. Roger
    Roger avatar
    1 posts
    Registered:
    11 Sep 2012
    27 Aug 2015 in reply to Steve
    Link to this post

    Steven,

    Were you able to get a solution to this 

  7. Steve
    Steve avatar
    3 posts
    Registered:
    12 Nov 2014
    27 Aug 2015 in reply to Roger
    Link to this post

    @Roger,

     Yes I have since managed to resolve this issue using extensionless URL's on teh Azure environment, by using the suggestion from @Nikola above with a small adjustment to fit our needs.

     

    Answered
7 posts, 1 answered