Render Razor template for email body but keep having errors

question, so i am planning to do some email sending in C# but the body will be some nifty HTML and CSS styling with extra data in it, so should i create a Razor file then render it in ? or is there a better option ? because currently i am trying out Razor and this line keeps failing me
string body= Engine.Razor.RunCompile(this.templatePath, null, MyOwnDictionaryObject);
string body= Engine.Razor.RunCompile(this.templatePath, null, MyOwnDictionaryObject);
Error :
System.TypeLoadException: 'Could not load type 'System.Security.Principal.WindowsImpersonationContext' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.'
System.TypeLoadException: 'Could not load type 'System.Security.Principal.WindowsImpersonationContext' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.'
and not so sure what that means
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server