I am using Hangfire in my sharepoint provider hosted app. I have Owin Startup class.
public class Startup
{
public void Configuration(IAppBuilder app)
{
GlobalConfiguration.Configuration.UseSqlServerStorage("DefaultConnection");
RecurringJob.AddOrUpdate(() => Console.WriteLine("Recurring!"), Cron.Minutely);
app.UseHangfireDashboard();
app.UseHangfireServer();
}
}
I have initialised defaultConnection in my web.config
file. Everytime i run, i get error saying Login failed for Domain\MachineName
, I tried passing user id and password in connection string, but still is fails saying login failed for that user.
Can anyone help me to find the issue?
I resolved this issue by creating a sql authentication login credential in my SQL server. I passed the created user id and password in my connection string.
The issue still persisted for windows authentication.