'LicensingPage' already in route collection
After registering a Jobs module into a local trial sitefinity 4.0 RC2 site, I browsed to my local site again and received the following error:
Hi Kristian,
Just saw your thread after I posted in another I found. Just in case you want to keep an eye on that one as well:
LicensingPage Thread.
Happy holidays.
Hi Kristian and Trevor,
This problem seems to be related with the Jobs module. We will inspect what is causing this and fix the issue for our upcoming releases.
Kind regards,
Radoslav Georgiev
the Telerik team
I have mainly seen this when a custom module causes the SystemManger to reload. It is not only in the Jobs module. I get this error when a new module is loaded and the
App.WorkWith().Page().PageManager.Provider.SuppressSecurityChecks = true
line is present.
Hello John,
Thank you for the clarification.
This line is required to be used because when the module is initializing there is no current user in the context of which the code should execute. Otherwise you would get security exceptions. We will investigate what is causing these issues when you suppress security checks.
Regards,
Radoslav Georgiev
the Telerik team
I haven't looked into it further, but my guess is that the Route collection isn't being cleared prior to the restart. Maybe has something to do with the the RestartApplication when not doing a full restart or SystemManager.RestartApplication(false); I guess trying a full restart a few times and see if this error still happens.
Just thinking through it. I'm a programmer, thats what we do... :)
Hello John,
We have done some further investigation of the issue.
The problem in the Jobs module is caused because it tries to create custom fields for the Documents module in the installation of the module. Then this module calls a method from the Fluent API which forces a restart of the application. With this restart the Sitefinity boot-strapper is run again and tries to go into the section for adding the route handlers.
With some new changes in the Sitefinity API restarts of the application should not be made in the installation of a module. The restart should be done by the system initializer. We are re-factoring the code in the sample module so that it does not restart the system when the module is being installed.
Kind regards,
Radoslav Georgiev
the Telerik team