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

Forums / General Discussions / 'LicensingPage' already in route collection

'LicensingPage' already in route collection

8 posts, 0 answered
  1. Lorne
    Lorne avatar
    38 posts
    Registered:
    04 Nov 2010
    01 Dec 2010
    Link to this post
    After registering a newly created module into a local trial Sitefinity site, I browsed to my local site again and received the following error:

    Server Error in '/' Application.

    A route named 'LicensingPage' is already in the route collection. Route names must be unique.
    Parameter name: name

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

    Exception Details: System.ArgumentException: A route named 'LicensingPage' is already in the route collection. Route names must be unique.
    Parameter name: name

    Source Error: 

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace: 

    [ArgumentException: A route named 'LicensingPage' is already in the route collection. Route names must be unique.
    Parameter name: name]
       System.Web.Routing.RouteCollection.Add(String name, RouteBase item) +2312930
       Telerik.Sitefinity.Abstractions.Bootstrapper.RegisterRoutes(RouteCollection routes) +296
       Telerik.Sitefinity.Abstractions.Bootstrapper.Bootstrap() +95
       Telerik.Sitefinity.Web.SitefinityHttpModule.Init(HttpApplication context) +24
       System.Web.Routing.UrlRoutingModule.System.Web.IHttpModule.Init(HttpApplication application) +10
       System.Web.HttpApplication.InitModulesCommon() +80
       System.Web.HttpApplication.InitModules() +43
       System.Web.HttpApplication.InitInternal(HttpContext context, HttpApplicationState state, MethodInfo[] handlers) +828
       System.Web.HttpApplicationFactory.GetNormalApplicationInstance(HttpContext context) +304
       System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext context) +107
       System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +327
    


    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1

  2. Lorne
    Lorne avatar
    38 posts
    Registered:
    04 Nov 2010
    01 Dec 2010
    Link to this post
    Hmmm... Okay. This seems to happen if a make a reference from the SiteFinity web application to my custom module project. Am I not allowed to make references to other projects from the Sitefinity web app?
  3. Vlad
    Vlad avatar
    498 posts
    Registered:
    19 Jun 2017
    07 Dec 2010
    Link to this post
    Hello Lorne,

    Thank you for reporting this issue.
    Adding a reference to a custom module should not cause such error. However, if in the Initialize() or Install() methods of your module class you have a code which somehow invokes soft restart of the application, this exception could be thrown.
    Is it possible for you to send us your custom module implementation so we could investigate the problem further?

    Kind regards,
    Vlad
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  4. Lorne
    Lorne avatar
    38 posts
    Registered:
    04 Nov 2010
    07 Dec 2010
    Link to this post
    I do a restart--just like your sample jobs module does.

    Is it possible that an exception being thrown in a module's Install method might cause this? If that's the case, perhaps the telerik internal code should re-throw the module's exception, or wrap it in another special ModuleInitializationFailed exception of some sort. A cryptic error related to the route collection is much less helpful.

    On a separate but related note, I wish the life cycle were a little more clear. It would seem that a module's Initialize method would be called each time the application starts. And the Install method would be called once--when an admin installs it from the admin page.

    I see strange behavior: I can't always get the Initialize method to be called when the app starts. However, both the Install and Initialize method sometimes will get called when I change the StartUpType from Disabled to OnFirstCall.

    Could you clarify when these methods are actually called?

    Thanks.
  5. Vlad
    Vlad avatar
    498 posts
    Registered:
    19 Jun 2017
    10 Dec 2010
    Link to this post
    Hello Lorne,

    Actually, if there is an error in the module installation, it should be handled and logged in the Log file. The reported from you error is a bug in our system and will try to avoid it. However, as we are not able to reproduce it, it will be helpful if you send us your custom module implementation - just to make sure that we will address the issue.

    Thanks,
    Vlad
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  6. Preetham Reddy
    Preetham Reddy avatar
    57 posts
    Registered:
    16 Jul 2012
    24 Dec 2010
    Link to this post
    Is this issue addressed... I just installed a new module and I get the same error 

    A route named 'LicensingPage' is already in the route collection. Route names must be unique.
    Parameter name: name

  7. Trevor
    Trevor avatar
    17 posts
    Registered:
    18 Nov 2010
    29 Dec 2010
    Link to this post
    I've also run into this problem now using the JobsModule. Haven't changed anything to the JobsModule project other than trying to add to sitefinity.

    Making some modifications to the SystemConfig.config seems to get me going again.

    This was the original line in the config while I was experiencing the problem:

    <add title="Jobs" description="" resourceClassId="" type="Jobs.JobsModule" startupType="OnFirstCall" name="Jobs" />

    Adding in a version number and changing the name slightly got sitefinity working again. Although I've had no luck getting the module to actually register with Sitefinity (but I'll keep trying else create another thread for that particular problem.)

    I'm using the latest build of RC 2. Any idea why it might be doing this?

    EDIT: Just ran into it again, all I did was build my module project and then build my website. As soon as I reload the website it gives me that particular error message.
  8. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    31 Dec 2010
    Link to this post
    Hello,

    It has been reported by other users that the problem is coming from this line of code:
    App.WorkWith().Page().PageManager.Provider.SuppressSecurityChecks = true;

    We will investigate why the suppression of security is causing problems and see what we can do to fix the issue.

    Kind regards,
    Radoslav Georgiev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
8 posts, 0 answered