{"id":2872,"date":"2019-04-30T11:29:52","date_gmt":"2019-04-30T05:59:52","guid":{"rendered":"https:\/\/www.idslogic.com\/blog\/?p=2872"},"modified":"2025-02-25T11:18:00","modified_gmt":"2025-02-25T05:48:00","slug":"pre-compilation-of-pages-in-sitefinity-how-it-works-and-its-implementation","status":"publish","type":"post","link":"https:\/\/www.idslogic.com\/blog\/pre-compilation-of-pages-in-sitefinity-how-it-works-and-its-implementation","title":{"rendered":"Pre-compilation of Pages in Sitefinity: How it Works and its Implementation"},"content":{"rendered":"<p><span style=\"font-size: 18pt; color: #008000;\"><strong>Telerik.Sitefinity.Compiler.exe<\/strong><\/span><\/p>\n<p><span style=\"font-size: 14pt;\">Sitefinity has a custom command line tool for precompiling pages.<\/span><\/p>\n<p><span style=\"font-size: 14pt; color: #008080;\"><strong>Sitefinity Version: V 7.3 or Above<\/strong><\/span><\/p>\n<p><span style=\"font-size: 14pt;\">Pre-compilation of pages gives the following advantages:<\/span><\/p>\n<ol>\n<li><span style=\"font-size: 14pt;\">Pages load faster when requested for the first time<\/span><\/li>\n<li><span style=\"font-size: 14pt;\">Reduces processor load<\/span><\/li>\n<li><span style=\"font-size: 14pt;\">Minimizes the warm up time when a site is deployed.<\/span><\/li>\n<\/ol>\n<hr \/>\n<p><span style=\"font-size: 18pt; color: #008000;\"><strong>How it Works<\/strong><\/span><\/p>\n<p><span style=\"font-size: 14pt;\">When a web page is requested, Sitefinity checks the page from the precompiled assembly. If the page is found in the assembly and its version matches with the requested page in the assembly, then the page from the assembly is loaded.<\/span><\/p>\n<p><span style=\"font-size: 14pt;\">If no matching is found, then the page is compiled dynamically.<\/span><\/p>\n<p><span style=\"font-size: 14pt;\">The tool uses a URL to connect to the site. It is always recommended to run the tool against the site with most up-to-date database and the application directory of the web application having the most up-to-date templates, user controls, master-pages stored on the file system including the most up-to-date compiled assemblies.<\/span><\/p>\n<p><span style=\"font-size: 14pt;\">Generally, we use two servers for the development of websites. <span style=\"color: #000080;\"><strong>Staging server<\/strong><\/span> and <span style=\"color: #000080;\"><strong>Live server<\/strong><\/span>. Therefore, as mentioned above, it is always recommended that the tool should be executed in the live environment, as a live site is always with the most recent database and the latest files.<\/span><\/p>\n<hr \/>\n<p><span style=\"color: #008000; font-size: 18pt;\"><strong>How to Implement<\/strong><\/span><\/p>\n<p><span style=\"font-size: 14pt;\">In the first step, you need to download and run the <span style=\"color: #ff0000;\"><a style=\"color: #ff0000;\" href=\"https:\/\/sitefinitystore.blob.core.windows.net\/files\/Telerik.Sitefinity.Compiler.1.0.0.12.zip\" target=\"_blank\" rel=\"nofollow noopener\">Sitefinity precompiler tool<\/a><\/span><\/span><\/p>\n<p><span style=\"font-size: 14pt; color: #ff0000;\"><a style=\"color: #ff0000;\" href=\"https:\/\/sitefinitystore.blob.core.windows.net\/files\/Telerik.Sitefinity.Compiler.1.0.0.12.zip\" target=\"_blank\" rel=\"nofollow noopener\">https:\/\/sitefinitystore.blob.core.windows.net\/files\/Telerik.Sitefinity.Compiler.1.0.0.12.zip<\/a><\/span><\/p>\n<p><span style=\"font-size: 14pt;\">The tool is\u00a0Telerik.Sitefinity.Compiler.exe<\/span><\/p>\n<p><span style=\"font-size: 14pt; color: #ff0000;\"><a style=\"color: #ff0000;\" href=\"https:\/\/www.progress.com\/documentation\/sitefinity-cms\/for-developers-sitefinity-precompiler-tool#authentication\" target=\"_blank\" rel=\"nofollow noopener\"><strong>Authentication<\/strong><\/a><\/span><\/p>\n<p><span style=\"font-size: 14pt;\">The Pre-compiler tool supports two types of Authentication:<\/span><\/p>\n<p><span style=\"font-size: 14pt; color: #008000;\"><strong>1- Authenticate with a Username and Password with Membership Provider.<\/strong><\/span><\/p>\n<p><span style=\"font-size: 14pt;\">For this, the user must be an administrator.<\/span><\/p>\n<p><span style=\"font-size: 14pt; color: #008080;\"><strong>Command Line Example<\/strong><\/span><\/p>\n<blockquote><p><span style=\"color: #000080;\"><em><span style=\"font-size: 14pt;\">Telerik.Sitefinity.Compiler.exe \/url=&#8221;http:\/\/ http:\/\/localhost:51824\/&#8221; \/appdir=&#8221;D:\\Projects\\SitefinityWebApp&#8221; \/username=&#8221;sfadminuname&#8221; \/password=&#8221;admin@6yyg2&#8243; \/strategy=&#8221;Frontend&#8221; \/membershipprovider=&#8221;Default&#8221;<\/span><\/em><\/span><\/p><\/blockquote>\n<p><span style=\"font-size: 14pt;\"><span style=\"color: #000080;\"><strong>URL -&gt;<\/strong><\/span> URL of the web application<\/span><\/p>\n<p><span style=\"font-size: 14pt;\"><strong><span style=\"color: #000080;\">Appdir -&gt;<\/span> <\/strong>Physical path of the web application<\/span><\/p>\n<p><span style=\"font-size: 14pt;\"><span style=\"color: #000080;\"><strong>Username -&gt;<\/strong><\/span>\u00a0Username to authenticate i.e. login username<\/span><\/p>\n<p><span style=\"font-size: 14pt;\"><span style=\"color: #000080;\"><strong>Password -&gt;<\/strong><\/span>\u00a0Password to login<\/span><\/p>\n<hr \/>\n<p><span style=\"font-size: 14pt; color: #008000;\"><strong>2- Authenticate with an Authentication Key. <\/strong><\/span><\/p>\n<p><span style=\"font-size: 14pt;\">For this, you must have to set the authentication key by logging in Sitefinity backend.<\/span><\/p>\n<p><span style=\"font-size: 14pt;\">Administration &#8211; Settings &#8211; Advanced &#8211; Pages &#8211; Compilation and Set the key in the Authentication key field.<\/span><\/p>\n<p><span style=\"font-size: 14pt; color: #008080;\"><strong>Command Line Example<\/strong><\/span><\/p>\n<blockquote><p><span style=\"color: #000080;\"><em><span style=\"font-size: 14pt;\">Telerik.Sitefinity.Compiler.exe \/url=&#8221;http:\/\/localhost: 51824&#8243; \/appdir=&#8221;D:\\Projects\\SitefinityWebApp&#8221; \/authKey=&#8221;6%6$#7777u{9u~]k3M3Q&#8221; \/strategy=&#8221;Frontend&#8221;<\/span><\/em><\/span><\/p><\/blockquote>\n<p><span style=\"font-size: 14pt;\">As we all know, compilation is always a time taking task in Sitefinity. So, we must identify the problematic pages or user controls. For this Sitefinity has a feature \u201c<span style=\"color: #000080;\"><strong>precompilation logging<\/strong><\/span><strong>\u201d<\/strong> to trace the same. You only have to enable the feature, which is disable by default.<\/span><\/p>\n<figure id=\"attachment_2873\" aria-describedby=\"caption-attachment-2873\" style=\"width: 957px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-2873 size-full\" src=\"https:\/\/www.idslogic.com\/blog\/wp-content\/uploads\/2019\/04\/Sitefinity-Compilation.png\" alt=\"Sitefinity Compilation\" width=\"957\" height=\"547\" srcset=\"https:\/\/www.idslogic.com\/blog\/wp-content\/uploads\/2019\/04\/Sitefinity-Compilation.png 957w, https:\/\/www.idslogic.com\/blog\/wp-content\/uploads\/2019\/04\/Sitefinity-Compilation-300x171.png 300w, https:\/\/www.idslogic.com\/blog\/wp-content\/uploads\/2019\/04\/Sitefinity-Compilation-768x439.png 768w, https:\/\/www.idslogic.com\/blog\/wp-content\/uploads\/2019\/04\/Sitefinity-Compilation-560x320.png 560w\" sizes=\"auto, (max-width: 957px) 100vw, 957px\" \/><figcaption id=\"caption-attachment-2873\" class=\"wp-caption-text\">source:progress.com<\/figcaption><\/figure>\n<blockquote>\n<p style=\"box-shadow: 0 0 16px #cccccc; padding: 10px;\"><span style=\"font-size: 14pt;\"><span style=\"color: #800000;\"><strong>Also Read:\u00a0<\/strong>\u00a0<\/span><a href=\"\/blog\/how-to-configure-the-security-policies-and-http-response-headers\"><span style=\"color: #ff0000;\">How to Configure the Security Policies and HTTP Response Headers<\/span><\/a><\/span><\/p>\n<\/blockquote>\n<p><span style=\"color: #800000;\"><strong><span style=\"font-size: 14pt;\">Contributed By:<\/span><\/strong><\/span><\/p>\n<p><span style=\"font-size: 14pt;\">Arunodaya Kumar<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Telerik.Sitefinity.Compiler.exe Sitefinity has a custom command line tool for precompiling pages. Sitefinity Version: V 7.3 or Above Pre-compilation of pages gives the following advantages: Pages load faster when requested for the first time Reduces processor load Minimizes the warm up&#8230;<\/p>\n","protected":false},"author":1,"featured_media":2874,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[251],"tags":[811,226],"class_list":["post-2872","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-sitefinity","tag-precompilation-in-sitefinity","tag-sitefinity-development"],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/www.idslogic.com\/blog\/wp-json\/wp\/v2\/posts\/2872","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.idslogic.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.idslogic.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.idslogic.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.idslogic.com\/blog\/wp-json\/wp\/v2\/comments?post=2872"}],"version-history":[{"count":3,"href":"https:\/\/www.idslogic.com\/blog\/wp-json\/wp\/v2\/posts\/2872\/revisions"}],"predecessor-version":[{"id":10719,"href":"https:\/\/www.idslogic.com\/blog\/wp-json\/wp\/v2\/posts\/2872\/revisions\/10719"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.idslogic.com\/blog\/wp-json\/wp\/v2\/media\/2874"}],"wp:attachment":[{"href":"https:\/\/www.idslogic.com\/blog\/wp-json\/wp\/v2\/media?parent=2872"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.idslogic.com\/blog\/wp-json\/wp\/v2\/categories?post=2872"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.idslogic.com\/blog\/wp-json\/wp\/v2\/tags?post=2872"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}