Reputation: 942
I have an ASP.NET Core and I am using template to sent email notification for user registration and reset password. Everything is working fine when I run the application on localhost, but when I build the image and run in a Linux Ubuntu Server I get the error /app/Views/Email not found
This is how I a getting the view:
var razorPage = GetRazorPage("Views/Email");
private RazorLightEngine GetRazorPage(string view)
{
string currentDirectory = Directory.GetCurrentDirectory();
var fullPath = Path.Combine(currentDirectory, view);
return new RazorLightEngineBuilder().UseFilesystemProject(fullPath).UseMemoryCachingProvider().Build();
}
Upvotes: 0
Views: 328
Reputation: 942
The problem was that the file was not available in Docker. I modify the file properties and it solved the issue.
Upvotes: 2