Hello,
we are running a Hangfire Server and an application named SchoolApp where I have to add a Hangfire Background Job.
The Hangfire server is running and with my local testing application it is working fine, with the SchoolApp it is not working.
The problem is, that the InvocationData is wrong (I think it is the assembly). Here is what is executing on the Hangifre server when i use my local test app (the job entry in the database):
{"Type":"HangfireServer.Service, HangfireServer, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null","Method":"Execute","ParameterTypes":"..."]","Arguments":null}
When I want to try it in the SchoolApp, the Job “Succeeded” but nothing happens, and it is storaged in the database as follows:
{"Type":"HangfireServer.Service, SchoolApp, Version=2.1.1.1, Culture=neutral, PublicKeyToken=null","Method":"Execute","ParameterTypes":"..."]","Arguments":null}
The call is looking like this:
var client = new BackgroundJobClient();
var job = client.Enqueue(() => HangfireServer.Service.Execute(token, jsonData));
So I think the problem is, that it is searching for a “SchoolApp” Lib/Method on the Hangfire server, but there is none and I am not allowed to change anything in the SchoolApp to HangfireServer. So my question is: Can I change a parameter or something, that I can achieve it?