Error executing template "Designs/bfa5-transport/_parsed/side-faerre-arbejdsulykker.parsed.cshtml"
System.ArgumentException: Object type cannot be converted to target type.
   at RazorEngine.Compilation.CrossAppDomainCleanUp.CleanupHelper.Init(AppDomain domain, IPrinter printer)
   at RazorEngine.Compilation.CrossAppDomainCleanUp.InitHelper.CreateHelper()
   at RazorEngine.Compilation.ExecutionContextLessThread.CallHelperSafeHelper`2.AsAction()
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at RazorEngine.Compilation.ExecutionContextLessThread.DefaultCallFunc[O](Func`1 f)
   at RazorEngine.Compilation.CrossAppDomainCleanUp..ctor(AppDomain toWatch, IPrinter printer)
   at RazorEngine.Compilation.CrossAppDomainCleanUp.CreateInitial()
   at System.Lazy`1.CreateValue()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Lazy`1.get_Value()
   at RazorEngine.Compilation.CrossAppDomainCleanUp.RegisterCleanup(String item, Boolean throwOnDefault)
   at RazorEngine.Templating.InvalidatingCachingProvider.CacheTemplate(ICompiledTemplate template, ITemplateKey templateKey)
   at RazorEngine.Templating.RazorEngineService.CompileAndCacheInternal(ITemplateKey key, Type modelType)
   at RazorEngine.Templating.RazorEngineService.GetCompiledTemplate(ITemplateKey key, Type modelType, Boolean compileOnCacheMiss)
   at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.b__0(TextWriter writer)
   at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
   at Dynamicweb.Rendering.Template.RenderRazorTemplate()

1 @using System.Web; 2 @using Dynamicweb.Rendering; 3 @using Dynamicweb.Content; 4 @using Dynamicweb.Data; 5 @inherits RazorTemplateBase<RazorTemplateModel<Template>> 6 7 @{ 8 // variables 9 var area = Pageview.Area; 10 var systemName = GetString("Item.Area.Systemnavn"); 11 12 var websiteTitel = GetString("Item.Area.Titel"); 13 var logoNormal = GetString("Item.Area.LogoNormal"); 14 var logoNegative = GetString("Item.Area.LogoNegativ"); 15 var newsPageId = GetString("Item.Area.Nyheder"); 16 var searchPageId = GetString("Item.Area.Soegeresultater"); 17 var materialsPageId = GetString("Item.Area.Materialer"); 18 var newsletterParagraphId = GetInteger("Item.Area.Nyhedsbrev"); 19 var googleAnalytics = GetString("Item.Area.GoogleAnalytics"); 20 var linkedIn = GetString("Item.Area.LinkedIn"); 21 var facebook = GetString("Item.Area.Facebook"); 22 var privacyPoliticsPageId = GetString("Item.Area.Privatlivspolitik"); 23 var cookiePageId = GetString("Item.Area.Cookie"); 24 var pageID = GetString("DwPageID"); 25 } 26 27 28 <!doctype html> 29 <html lang="da" itemscope="" itemtype="https://schema.org/Organization"> 30 <head> 31 <meta charset="utf-8"> 32 <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> 33 34 <meta name="author" content=""> 35 <link rel="icon" href="/Files/Templates/Designs/bfa5-transport/../../../../favicon.ico"> 36 37 <title>@GetValue("Title")</title> 38 @GetValue("MetaTags") 39 @GetValue("CopyRightNotice") 40 41 42 <!-- google font --> 43 <link href="https://fonts.googleapis.com/css?family=Archivo:400,600" rel="stylesheet"> 44 <link href="https://fonts.googleapis.com/css?family=Heebo" rel="stylesheet"> 45 46 <!-- font awesome --> 47 <link href="/Files/Templates/Designs/bfa5-transport/css/libs/fontawesome/css/all.css" rel="stylesheet"> 48 49 <!-- css --> 50 <!--<link href="css/styles.min.css" rel="stylesheet">--> 51 <link href="/Files/Templates/Designs/bfa5-transport/css/faerre-arbejdsulykker.css?v=1.1" rel="stylesheet"> 52 <link href="/Files/Templates/Designs/bfa5-transport/css/print.min.css" rel="stylesheet" media="print"> 53 <link rel="preconnect" href="https://fonts.gstatic.com"> 54 <link href="https://fonts.googleapis.com/css2?family=Gochi+Hand&display=swap" rel="stylesheet"> 55 56 <!-- google analytics --> 57 @googleAnalytics 58 59 <!-- dw standard scripts --> 60 61 @GetValue("Stylesheets") 62 @GetValue("Javascripts") 63 </head> 64 65 <body class="site-faerre-arbejdsulykker pageid-@pageID"> 66 67 <header id="header" class="shadow"> 68 <div class="inner"> 69 <div class="logo"> 70 <a href="/"><img src="@logoNegative" alt="@websiteTitel"></a> 71 </div> 72 <div class="site-title"> </div> 73 <!--<div class="mobile-menu-button"> 74 <i class="fas fa-bars"></i> 75 </div>--> 76 </div> 77 </header> 78 <div id="main-wrapper"> 79 <!--<nav class="top-nav"> 80 <ul id="top-nav" class="dwnavigation" data-settings="template:main.xslt;startlevel:4;endlevel:99;expandmode:all;"> 81 <li></li> 82 </ul> 83 </nav>--> 84 <main class="main"> 85 @using Dynamicweb.Rendering; 86 @using Dynamicweb.Frontend; 87 @using Dynamicweb.Content.Items; 88 @inherits RazorTemplateBase<RazorTemplateModel<Template>> 89 90 91 @{ 92 var pageTop = PageView.GetPageviewByPageID(GetInteger("DwTopPageID")); 93 var pageItem = (pageTop.Item != null) ? Item.GetItemById("Transport_Branche", pageTop.Item.Id) : null; 94 } 95 <div class="corner-wrap shadow section1"> 96 97 <div id="page1" class="content wrapper" itemprop="text">@GetValue("DwContent(page1)")</div> 98 99 <div class="topleft-corner corner"> 100 <svg version="1.1" id="Lag_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewbox="0 0 193 229" style="enable-background:new 0 0 193 229;" xml:space="preserve"> 101 <path class="svg-green" d="M0,217.2c-0.3-35.8,10.2-75.8,32-113.6C69.1,39.4,128.3,0.2,180.3,0v0H0L0,217.2L0,217.2z"></path> 102 </svg> 103 </div> 104 <div class="bottomright-corner corner"> 105 <svg version="1.1" id="Lag_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewbox="0 0 193 229" style="enable-background:new 0 0 193 229;" xml:space="preserve"> 106 <path class="svg-green" d="M0,217.2c-0.3-35.8,10.2-75.8,32-113.6C69.1,39.4,128.3,0.2,180.3,0v0H0L0,217.2L0,217.2z"></path> 107 </svg> 108 </div> 109 </div> 110 <div class="shadow section2"> 111 <div id="page2" class="content wrapper" itemprop="text">@GetValue("DwContent(page2)")</div> 112 </div> 113 <div class="gray-section section3"> 114 <div id="page3" class="content wrapper" itemprop="text">@GetValue("DwContent(page3)")</div> 115 </div> 116 <div class="section4"> 117 <div id="page4a" class="content wrapper" itemprop="text">@GetValue("DwContent(page4a)")</div> 118 <div class="wrapper side-by-side"> 119 <div id="page4b" class="content" itemprop="text">@GetValue("DwContent(page4b)")</div> 120 <div id="page4c" class="content" itemprop="text">@GetValue("DwContent(page4c)")</div> 121 </div> 122 123 <div class="section5"> 124 <div id="page5a" class="content wrapper" itemprop="text">@GetValue("DwContent(page5a)")</div> 125 <div class="wrapper side-by-side"> 126 <div id="page5b" class="content" itemprop="text">@GetValue("DwContent(page5b)")</div> 127 <div id="page5c" class="content" itemprop="text">@GetValue("DwContent(page5c)")</div> 128 </div> 129 130 131 </div> 132 </div></main> 133 134 <footer class="footer"> 135 136 </footer> 137 <script src="/Files/Templates/Designs/bfa5-transport/js/scripts.min.js"></script> 138 <script src="/Files/Templates/Designs/bfa5-transport/js/pb-scripts.js"></script> 139 <script src="/Files/Templates/Designs/bfa5-transport/js/analytics.js"></script> 140 </div></body> 141 </html>