I have tried other solutions posted to stackoverflow and have found none that work, here is my problem.
So I want to send an email using hangfire through my MVC application, this works on my local machine but when I upload it to a remote server I get the following error on hangfire:
The virtual path ‘/’ maps to another application, which is not allowed
This is the code I use to send the email:
foreach (var EmailEntry in EmailEntries)
var email = new EmailTemplateModel
ViewName = “EmailTemplateModel”,
FromAddress = "email@example.com",
EmailAddress = EmailEntry,
Subject = “Task Report”,
Date = Dates,
Task = DatesAndTasks,
When I use the ‘ViewName’ method it returns ‘~/Views/Emails’ on my local machine.