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

Forums / General Discussions / Catch all route and Backend routes

Catch all route and Backend routes

4 posts, 0 answered
  1. Rick de Vries
    Rick de Vries avatar
    7 posts
    Registered:
    22 Feb 2010
    11 Aug 2011
    Link to this post
    Hi there,

    I'm using Sitefinity 4.1 SP2.

    I'm trying to use a catch all handler to return my custom 404 pages for all non-existent routes. However, i need to set RouteExistingFiles to false (cassini fails instantly, this only works under IIS (and express)) to get my css, javascript and image files.

    routes.MapPageRoute("NotFound", "{*url}", Config.ErrorPageUrl);
    routes.RouteExistingFiles = false;

    My backend is unreachable though. It returns a white page which only shows an empty head and body block.

    I can see a BackendRoute defined in the route collection, but apparently it does not create or handle all backend url's because the handler doesn't figure out it's bound to the backend.

    Any ideas on how to fix this?
  2. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    15 Aug 2011
    Link to this post
    Hi Rick De Vries,

    Can you please check if your rule is catching the requests for services also? The whole backend is populated with data by services. Is it possible that their execution is failing for some reason?

    All the best,
    Radoslav Georgiev
    the Telerik team
    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 Public Issue Tracking system and vote to affect the priority of the items
  3. Rick de Vries
    Rick de Vries avatar
    7 posts
    Registered:
    22 Feb 2010
    16 Aug 2011
    Link to this post
    Hi,

    I've excluded some paths/resources from routing, it still returns a blank page ( I viewed the page source and it contains absolutely no data)

    What I discovered is that the default redirects from the sitefinity/ (to login or the default page) directory do not get fired, and the blank response is returned. If I supply the url with the location i want to go to (sitefinity/Login or sitefinity/Pages) it goes to the sitefinity pages.

    How can I fix this?
  4. Rick de Vries
    Rick de Vries avatar
    7 posts
    Registered:
    22 Feb 2010
    16 Aug 2011
    Link to this post
    I've finally fixed this. Because i had routeExistingPages set to false, it recognized the directory as being a file and decided not to act upon it. I removed the line and now it works.
4 posts, 0 answered