c# - UseTaskFriendlySynchronizationContext with WebForms and WebAPI in the same project -
i have legacy app uses webforms need extend. incorporated webapi newer functionality . works great until start using async await.
in webapi usetaskfriendlysynchronizationcontext = false cause httpcontext null. setting true fixes issue.
in webforms usetaskfriendlysynchronizationcontext = true causes pages never return. it's iis never returns response. setting false fixes this.
is there someway have true webapi , false webforms?
no, it's not possible have set @ level. asp.net runtime in process (technically app-domain) must use 1 implementation.
my recommendation investigate webforms code , determine why deadlocking new syncctx. vast majority of code should work fine, there must unusual there.
Comments
Post a Comment