HangfireIO / HangfireIO/Hangfire
Hangfire could not load file or assembly 'App_Code.dhf3kgly, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies
- Dominant language
- C#
- Stars
- 10.1k
- Forks
- 1.8k
- Avg merge
- 1h 19m
- Merged PRs (30d)
- 1
Description
I have a windows service which works as a **hangfire server** and another one is legacy asmx - asp.net web service which works as a **hangfire client**. My web service is in vb.net.
I am creating hangfire request like this in my web service -
```
If (True) Then
BackgroundJob.Enqueue(Sub() ProcessRules())
End If
```
This **ProcessRules()** is my another web method defined in web service. Now when my web service tried to execute above code, it successfully executed and create one new job request in hangfire dashboard. But when i checked the windows service log, it shows me below error.
> System.IO.FileLoadException: Could not load file or assembly 'App_Code.dhf3kgly, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'
> or one of its dependencies. The located assembly's manifest definition does not match the assembly reference.
> (Exception from HRESULT: 0x80131040)
>
Now to overcome this issue, i have added the **web service** reference in **windows service**. But no luck, same error occurred. Could any body here ever faced this type of situation? Or Is it a kind of limitation with legacy web service? could any body enlighten my to fix this issue?
Contributor guide
Research direction
Start with the Windows service log, the BackgroundJob.Enqueue call, and the separate Hangfire server and client descriptions. Trace how the App_Code.dhf3kgly assembly is referenced and loaded in each service, then verify the job can execute successfully without the FileLoadException.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, visualbasic
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100