Error executing template "Designs/bfa5-transport/_parsed/Nyhedsbrev - 2019.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 @inherits RazorTemplateBase<RazorTemplateModel<Template>> 2 @using Dynamicweb; 3 @using System; 4 @using System.Linq; 5 @using System.Globalization; 6 @using Dynamicweb.Rendering; 7 8 @{ 9 var domain = "bautransport.dk"; 10 var subject = GetString("Item.Emne"); 11 var webVersion = GetGlobalValue("Global:Page.ID").ToString(); 12 13 var culture = new CultureInfo("da-DK"); 14 var date = GetDate("Item.Dato").ToString("d. MMMM yyyy", culture); 15 16 var googleAnalytics = GetString("Item.Area.GoogleAnalytics"); 17 } 18 19 <!doctype html> 20 <!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]--> 21 <!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]--> 22 <!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]--> 23 <html lang="da"> 24 <head> 25 <meta charset="utf-8"> 26 <meta http-equiv="X-UA-Compatible" content="IE=edge"> 27 <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> 28 <title>@GetValue("Title")</title> 29 @GetValue("MetaTags") 30 @GetValue("CopyRightNotice") 31 32 <script src="//cdnjs.cloudflare.com/ajax/libs/modernizr/2.8.3/modernizr.min.js" async=""></script> 33 <style> 34 35 * { 36 font-family: Verdana, Arial, sans-serif !important 37 } 38 39 body { 40 background-color: #f1f1f1; 41 } 42 43 td, h1, h2, h3, h4, h5 { 44 font-family: Verdana, Arial, sans-serif !important 45 } 46 47 p, a { 48 font-size: 14px; 49 } 50 51 #footer a { 52 color: #000; 53 } 54 55 img { 56 display: block; 57 } 58 59 .indhold table td { 60 color: #000; 61 } 62 63 pre { 64 color: #000; 65 } 66 67 td[class*="col-"] { 68 background-color: #fff; 69 } 70 71 .only-desktop { 72 display: block; 73 } 74 75 .only-mobile { 76 display: none; 77 } 78 79 @@media only screen and (max-width: 599px) { 80 img { 81 max-width: 100%; 82 height: auto !important; 83 } 84 85 table.responsive, 86 table.responsive > tbody, 87 table.responsive > tbody > tr, 88 table.responsive > tbody > tr > td, 89 table.responsive > tr, 90 table.responsive > tr > td { 91 display: block; 92 width: auto !important; 93 float: none !important; 94 } 95 96 table.responsive-auto { 97 width: auto; 98 } 99 100 .fullWidth { 101 width: 100% !important; 102 } 103 104 img.responsive-fullimg, 105 .responsive-fullimg img { 106 width: 100% !important; 107 } 108 109 .responsive-hide { 110 display: none !important; 111 } 112 113 .responsive-show { 114 display: block !important; 115 } 116 117 .responsive-left { 118 text-align: left !important; 119 } 120 121 .responsive-right { 122 text-align: right !important; 123 } 124 125 .responsive-center { 126 text-align: center !important; 127 } 128 129 .footer-bottom { 130 text-align: center !important; 131 } 132 133 .width140 { 134 width: 140px !important; 135 display: inline-block; 136 } 137 138 .width30 { 139 width: 30px !important; 140 display: inline-block; 141 } 142 143 .marginAuto { 144 margin: 0 auto !important; 145 } 146 147 .only-desktop { 148 display: none; 149 } 150 151 .only-mobile { 152 display: block !important; 153 max-height: none !important; 154 overflow: visible !important; 155 } 156 } 157 158 </style> 159 @googleAnalytics 160 @GetValue("Stylesheets") 161 @GetValue("Javascripts") 162 </head> 163 164 <body style="font: 12px verdana, arial, sans-serif;color: #ffffff; width:100%; margin:0 auto;"> 165 <center> 166 <table class="responsive" style="border-collapse: collapse; width: 600px; color: #006440;"> 167 <tr> 168 <td style="text-align: right; width: 200px;padding:15px 0 15px 15px;"> 169 <a style="color: #006440; font-weight:bold;" href="http://@domain/Default.aspx?ID=@webVersion" target="_blank">Læs en web-version</a> 170 </td> 171 </tr> 172 </table> 173 <table class="responsive" style="border-collapse: collapse;width: 600px; font: 12px verdana, arial, sans-serif;"> 174 <tr> 175 <td style="width:600px; background-color: #006440; padding:15px 0px; border-bottom:3px solid #fff; text-align: center;"> 176 <img src="/Files/Templates/Designs/bfa5-transport/img/nyhedsbrev/logo.png" alt="BAU Transport" style="margin-left:auto;margin-right:auto;display: block;"> 177 </td> 178 </tr> 179 <tr> 180 <td class="greentd" style="background-color: #fff;color: #006440;font-weight:bold; text-align:center;padding: 15px 0;width:600px;"> 181 <p style="color:#777; font-size:10px; padding:0;margin:0; padding-bottom:5px;">@date</p> 182 <h1 style="font-size:16px; margin:0; padding:0;">@subject</h1> 183 </td> 184 </tr> 185 <tr> 186 <td style="padding:10px 0;width:600px;background-color:transparent;"></td> 187 </tr> 188 <tr> 189 <td> 190 <div id="indhold" class="indhold">@GetValue("DwContent(indhold)")</div> 191 </td> 192 </tr> 193 </table> 194 <table class="responsive" cellpadding="0" cellspacing="0" style="border-collapse: collapse;width: 600px; font: 12px verdana, arial, sans-serif;" bgcolor="#006440"> 195 <tr><td colspan="3" style="height: 20px;line-height: 20px;font-size: 20px;"></td></tr> 196 <tr> 197 <td class="greentd" style="background-color: #006440;color: #fff;text-align: center; padding-top:20px; width:200px;"> 198 <a style="color: #fff;padding: 0 5px;display: inline-block;padding-bottom: 2px;text-decoration: none;border-bottom: 1px solid #fff;" href="http://@domain">www.bautransport.dk</a> 199 </td> 200 <td class="greentd" style="background-color: #006440;color: #fff;text-align: center; padding-top:20px; width:200px;"> 201 <a style="color: #fff;padding: 0 5px;display: inline-block;padding-bottom: 2px;text-decoration: none;border-bottom: 1px solid #fff;" href="mailto:dinemail@domaene.dk?subject=@subject&body=http://@domain/Default.aspx?ID=@webVersion" target="_blank">Send til en kollega</a> 202 </td> 203 <td class="greentd" style="background-color: #006440;color: #fff;text-align: center; padding-top:20px; width:200px;"> 204 <a style="color: #fff;padding: 0 5px;display: inline-block;padding-bottom: 2px;text-decoration: none;border-bottom: 1px solid #fff;" href="http://@domain/Default.aspx?ID=3670" target="_blank">Tilmeld nyhedsbrev</a> 205 </td> 206 </tr> 207 <tr> 208 <td colspan="3" class="greentd" style="background-color: #006440;color: #fff;text-align: center; padding-bottom:40px; padding-top:40px; padding-left:30px; padding-right:30px;"> 209 BAU transport og engros er et arbejdsmiljøforum til fremme af transport og engros branchens arbejdsmiljøforhold. BAU transport er en del af Branchefællesskabet for arbejdsmiljø for transport, service, turisme og jord til bord. 210 </td> 211 </tr> 212 </table> 213 <table class="outerTable footer responsive" cellspacing="0" cellpadding="0" style="border-collapse: collapse;width: 600px;text-align: center; color: #000; font: 12px verdana, arial, sans-serif;"> 214 <tr> 215 <td id="footer" style="width:600px; background-color:#fff;padding: 15px;"> 216 <p style="color: #000;margin: 0;"><a style="color: #000;text-decoration: none;" href="http://@domain/Default.aspx?ID=3686" target="_blank">Afmeld nyhedsbrev</a></p> 217 <p style="display: none;margin: 0;">{{EmailMarketing:Email.UnsubscribeLink}}</p> 218 </td> 219 </tr> 220 </table> 221 </center> 222 </body> 223 224 </html>