You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I'm trying to use this library for email templating in ASP web Api, I'm using the UseAppdomain Option, but is unable to load the Westwind.Razor dll, I have set the BaseBinaryFolder to the path where all the dll's exists, but the error is the same, if I use the UseAppdomain = false, everything works fine, I tried this with a console application, and works with no issue
Web Api Structure (root path)
c:\...\
this is the class for the renderer I'm Using
publicclassRazorTemplates:IDisposable{RazorFolderHostContainerHost{get;set;}publicRazorTemplates(){stringServerMapPath= HttpContext.Current.Server.MapPath("~");// c:\\...\ root pathHost=new RazorFolderHostContainer(){// *** Set your Folder Path here - physical or relative ***TemplatePath= Path.Combine(ServerMapPath,"Views","Email"),//c:\\...\Views\Email// *** Path to the Assembly path of your applicationBaseBinaryFolder= Path.Combine(ServerMapPath,"bin"),//c:\\...\binUseAppDomain=true,ThrowExceptions=true};
Host.Start();}publicstringRenderTemplate(stringtemplate,objectmodel){stringresult= Host.RenderTemplate(template, model);if(result==null){thrownew InvalidOperationException(Host.ErrorMessage);}returnresult;}publicvoidDispose(){
Host.Stop();
Host.Dispose();}}
Hello, I'm trying to use this library for email templating in ASP web Api, I'm using the UseAppdomain Option, but is unable to load the Westwind.Razor dll, I have set the BaseBinaryFolder to the path where all the dll's exists, but the error is the same, if I use the UseAppdomain = false, everything works fine, I tried this with a console application, and works with no issue
Web Api Structure (root path)
c:\...\
this is the class for the renderer I'm Using
Rendering a template
The exception:
The text was updated successfully, but these errors were encountered: