Error executing template "Designs/bfa5-transport/_parsed/side-sporrespekt.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 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 <!-- css --> 43 <link href="/Files/Templates/Designs/bfa5-transport/css/sporrespekt.css?v=1" rel="stylesheet" media="all"> 44 45 <!-- google analytics --> 46 @googleAnalytics 47 48 <!-- dw standard scripts --> 49 50 @GetValue("Stylesheets") 51 @GetValue("Javascripts") 52 </head> 53 54 <body class="site-sporrespekt"> 55 <header id="header"> 56 <div class="container"> 57 <div class="logo"> 58 <a href="/"><img width="180" src="/Files/Templates/Designs/bfa5-transport/img/sporrespekt/bau-transport-logo-black.svg" alt="@websiteTitel"></a> 59 </div> 60 <div class="content"> 61 <div id="headercontent" itemprop="text">@GetValue("DwContent(headercontent)")</div> <div id="headercontent2" itemprop="text">@GetValue("DwContent(headercontent2)")</div> 62 </div> 63 </div> 64 </header> 65 66 <main class="main"> 67 <div class="container"> 68 69 <div id="kolonnercontent" class="columns" itemprop="text">@GetValue("DwContent(kolonnercontent)")</div> 70 71 72 </div> 73 </main> 74 75 <footer class="footer"> 76 <div class="container"> 77 <div id="footercontent" itemprop="text">@GetValue("DwContent(footercontent)")</div> 78 </div> 79 </footer> 80 81 <script src="/Files/Templates/Designs/bfa5-transport/js/analytics.js"></script> 82 </body> 83 </html>