Error executing template "Designs/bfa5-transport/_parsed/nyhedsbrev_model1.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 System; 3 @using System.Linq; 4 @using Dynamicweb.Rendering; 5 6 @{ 7 string Afmeld_Nyhedsbrev = GetString("Item.Afmeld_Nyhedsbrev"); 8 string Tilmeld_Nyhedsbrev = GetString("Item.Tilmeld_Nyhedsbrev"); 9 string WebVersion = GetString("Item.WebVersion"); 10 string Sendtilkollega = GetString("Item.Sendtilkollega"); 11 string Sidefod = GetString("Item.Sidefod"); 12 string Title = GetString("Title"); 13 } 14 15 <!doctype html> 16 <!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]--> 17 <!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]--> 18 <!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]--> 19 <html lang="da"> 20 <head> 21 <meta charset="utf-8"> 22 <meta name="robots" content="noindex, nofollow"> <!-- OBS! Fjernes når siden skal live --> 23 <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> 24 <title>@GetValue("Title")</title> 25 @GetValue("MetaTags") 26 @GetValue("CopyRightNotice") 27 28 <script src="//cdnjs.cloudflare.com/ajax/libs/modernizr/2.8.3/modernizr.min.js" async=""></script> 29 30 <style> 31 32 </style> 33 @GetValue("Stylesheets") 34 @GetValue("Javascripts") 35 </head> 36 37 <body class="newsletter1" style="background-color: #7c858d;font: 12px verdana, arial, sans-serif;color: #ffffff;"> 38 <style> 39 * { font-family: Verdana, Arial, sans-serif !important } 40 td,h1,h2,h3,h4,h5 { font-family: Verdana, Arial, sans-serif !important } 41 p, a { font-size: 12px; } 42 #footer a { color: #FFFFFF; } 43 @@media (max-width: 600px) { 44 img {max-width: 100%;} 45 .outerTable {width: 100%;} 46 .col-xs-12 {display: block; width: auto; height: auto;} 47 .greentd a {display: block; padding: .5em 0;} 48 } 49 </style> 50 <center> 51 <table class="outerTable" style="border-collapse: collapse; width: 600px; color: #FFFFFF; font: 12px verdana, arial, sans-serif;color: #ffffff;"> 52 <tr> 53 <td> 54 <p>Hej {{Email:User.Name}}</p> 55 <div id="top" class="top">@GetValue("DwContent(top)")</div> 56 </td> 57 <td style="text-align: right; width: 150px"> 58 Driller visningen?<br> 59 <a href="/@WebVersion" style="color: #fff">Læs en web-version</a> 60 </td> 61 </tr> 62 </table> 63 <table class="outerTable" style="border-collapse: collapse;width: 600px; font: 12px verdana, arial, sans-serif;"> 64 <tr> 65 <td style=""> 66 <img src="http://www.bartransport.dk/Files/Billeder/BAR%20Transport/Nyhedsbreve/topbar.jpg" alt="" style="margin-left:auto;margin-right:auto;display: block;"> 67 </td> 68 </tr> 69 <tr> 70 <td class="greentd" style="background-color: #006440;color: #fff;text-align: center;padding: 10px 0;"> 71 <a href="http://bautransport.dk" style="color: #fff;margin: 0 5px;">www.bautransport.dk</a> 72 <a href="http://bautransport.dk/nyhederne/nyheder/nyhedsbreve/nyhedsbrev-arkiv/send-til-en-kollega?page=@WebVersion" target="_blank" style="color: #fff;margin: 0 5px;">Send til en kollega</a> 73 </td> 74 </tr> 75 <tr> 76 <td> 77 <div id="indhold" class="indhold">@GetValue("DwContent(indhold)")</div> 78 </td> 79 </tr> 80 </table> 81 <table class="outerTable" style="border-collapse: collapse;width: 600px; font: 12px verdana, arial, sans-serif;"> 82 <tr> 83 <td class="greentd" style="background-color: #006440;color: #fff;text-align: center;padding: 10px 0;"> 84 <a href="http://bautransport.dk" style="color: #fff;margin: 0 5px;">www.bautransport.dk</a> 85 <a href="http://bautransport.dk/nyhederne/nyheder/nyhedsbreve/nyhedsbrev-arkiv/send-til-en-kollega?page=@WebVersion" target="_blank" style="color: #fff;margin: 0 5px;">Send til en kollega</a> 86 <a href="http://bautransport.dk/nyhederne/nyheder/nyhedsbreve" target="_blank" style="color: #fff;margin: 0 5px;">Tilmeld nyhedsbrev</a> 87 </td> 88 </tr> 89 <tr><td class="greentd" style="background-color: #006440;color: #fff;text-align: center;padding: 10px 10px 10px 10px;"> 90 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. 91 </td></tr> 92 93 94 </table> 95 <table class="outerTable footer" style="border-collapse: collapse;width: 600px;text-align: center; color: #FFFFFF; font: 12px verdana, arial, sans-serif;"> 96 <tr> 97 <td id="footer"> 98 @Sidefod 99 <p style="color: #FFFFFF !important">{{EmailMarketing:Email.UnsubscribeLink}}</p> 100 </td> 101 </tr> 102 </table> 103 <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> 104 <script> 105 var _gaq=[['_setAccount','UA-7022193-8'],['_trackPageview']]; 106 (function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0]; 107 g.src='//www.google-analytics.com/ga.js'; 108 s.parentNode.insertBefore(g,s)}(document,'script')); 109 </script> 110 <script> 111 (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ 112 (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), 113 m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) 114 })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); 115 116 ga('create', 'UA-12107656-7', 'auto'); 117 ga('send', 'pageview'); 118 119 </script> 120 </center> 121 </body> 122 123 </html> 124