For my 4rd-year Software Engineering final project at university, I’m building an AI Meeting Assistant.

The core feature is simple: A user uploads a 20-minute audio recording of a meeting. My backend downloads it from Backblaze B2, sends it to an selfhosted transcription service to transcribe the speech, and then passes that text to Google Gemini to generate structured meeting minutes that are sent to you email.

There was just one massive problem: It takes over a minute to process.

If I ran this logic inside my standard API Controller, the user’s browser would just show a loading spinner for 90 seconds, eventually hitting a 504 Gateway Timeout.

The solution? ASP.NET Core Background Services. Here is how I implemented a background worker to handle the heavy AI lifting, and the 3 massive "Gotchas" I ran into along the way.