I am doing an MVC 5 APP
and i am calling a Api Controller using PostAsJsonAsync
like this
HttpResponseMessage response = await client.PostAsJsonAsync(apiUrl + "Method/Action",param);
I got this error
[InvalidOperationException: An asynchronous module or handler completed while an asynchronous operation was still pending.]
I am doing this call from Global.asax
Session_Start
.
The intention is to register every person Access the site.
I have to modify Session_Start
to async void Session_Start
How can manage this situation? Making the call process Non-Asynchronous?