Reputation: 425
I have an ASP.NET project on .NET 4.5 and I can't seem to get async-await controller actions to work with HttpContext.Current
. I've tried everything, such as setting httpRuntime targetFramework to 4.5, using aspnet:UseTaskFriendlySynchronizationContext = true
but when I step through a call HttpContext.Current
is null after any async-await calls (I've made sure to NOT have the async code resume on another thread) and SynchronizationContext.Current
is always null, before and after any async-await calls.
So I have to assume that perhaps mono doesn't have support for ASP.NET re: async-await. I'm running via xsp4 on macos with mono 6.12.0.
UPDATE: I just tried the same project under full .NET on a Windows machine and SynchronizationContext.Current
was set to an instance of AspNetSynchronizationContext
.
Upvotes: 0
Views: 20