≈ the.bay.news

Obfuscating a Hangfire App Without Breaking Persisted Background Jobs

DEV Community
Obfuscating a Hangfire App Without Breaking Persisted Background Jobs
Hangfire serializes every enqueued, scheduled and recurring job to storage as the fully-qualified type name, method name and parameter types, then resolves that back to a MethodInfo by reflection when a worker runs it — possibly on a later deployment. Obfuscate after the build and renaming moves the job class or method out from under those stored strings, so every in-flight and recurring job fails to deserialize with a could-not-load-type error. This post explains exactly what Hangfire writes to its storage, why recurring and long-delayed jobs are the sharpest edge, and how to pin the job classes, invoked methods and their parameter types with a Nebula.NET keep-list while renaming everything else.

0 comments

Sign in to join the discussion — your thebay.events account works here.

No comments yet.