Sitefinity CMS has a custom command-line tool for precompiling pages - Telerik.Sitefinity.Compiler.exe. It compiles the generated markup, retrieved from the markup service.
Since Sitefinity CMS pages are dynamically generated, their entire markup is retrieved via a service endpoint, which is available at /restapi/markup. From that endpoint, the markup for a requested page in a specific language is retrieved and prepared for compilation.
When a frontend page is requested, Sitefinity CMS tries to load the page from the precompiled assembly, if present. If the page is found in the assembly and its version matches the one that the page in the assembly was built with, the page from the assembly is loaded and served. If there is no match, the page is compiled dynamically.
NOTE: If you apply a change to a template, on which many pages are based, all of the pages based on it will have a different version and will be no longer loaded from the precompiled assembly.
Download Sitefinity CMS precompiler tool and extract the .zip files. The tool is Telerik.Sitefinity.Compiler.exe. For more information about the commands you can use in the tool, see Reference: Command line arguments.
RECOMMENDATION: Since the tool uses a URL to connect to the site, and to retrieve the markup, we recommend to run the tool against the site which is connected to the most up-to-date database. The application directory of the Sitefinity CMS web application should contain the most up-to-date templates, user controls, master-pages stored on the file system, as well as the most up-to-date compiled application assemblies. For example, if you have two servers – a production and a staging server, the tool should be executed against the site with the most recent database changes (production server) with the application directory of the staging server.
In order authenticate with Sitefinity CMS, the precompiler tool supports the following methods:
AuthKey
NOTE: Only one of the two authentication methods can be used at a given time. Authentication with an authentication key and the AuthKey argument has a higher priority over authentication with a username and a password.
Scanning the files generated by the precompiler with certain antivirus software, may lead to an AppDomainUnloadException. To work around this issue, you need to set the httpruntime/delayNotificationTimeout property in your web.config to a greater value, namely between 10 and 30 seconds. For more information, see HttpRuntimeSection.DelayNotificationTimeout Property.
Increase your Sitefinity skills by signing up for our free trainings. Get Sitefinity-certified at Progress Education Community to boost your credentials.
This free lesson teaches administrators, marketers, and other business professionals how to use the Integration hub service to create automated workflows between Sitefinity and other business systems.
This free lesson teaches administrators the basics about protecting yor Sitefinity instance and its sites from external threats. Configure HTTPS, SSL, allow lists for trusted sites, and cookie security, among others.
The free on-demand video course teaches developers how to use Sitefinity .NET Core and leverage its decoupled architecture and new way of coding against the platform.
To submit feedback, please update your cookie settings and allow the usage of Functional cookies.
Your feedback about this content is important