ASP.NET synchronization context does not allow you to run work items with the fire and forget function from the request. The runtime actively monitors such things and will try to throw an exception, because these code templates lead to null refs, deadlocks, AVs and other nasty things.
If you absolutely need to get started with fire-and-forget in ASP.NET, consider using WebBackgrounder . It integrates with ASP.NET extensibility points that are designed for this. This way, it will not block the active request, but keep in mind that Stephen warns: it was never guaranteed to be executed at all. If you need guaranteed performance, consider a reliability mechanism such as Service Bus.
source share