ASP.NET Web API 2 Async action methods with Task.Run performance
I’m trying to benchmark (using Apache bench) a couple of ASP.NET Web API 2.0 endpoints. One of which is synchronous and one async.
I’m trying to benchmark (using Apache bench) a couple of ASP.NET Web API 2.0 endpoints. One of which is synchronous and one async.
We can now use the async/await key words in ASP.NET MVC 4.
I’m using a “Post” async method of webApi rest service:
I’m seeing some null reference issue when developing some ASP.Net application. The exception is as this below:
As best as I can, I opt for async all the way down. However, I am still stuck using ASP.NET Membership which isn’t built for async. As a result my calls to methods like string[] GetRolesForUser() can’t use async.
I have a variation of the benefits-of-async/await-on-ASP.NET from this question.
I have this API client which has a send method used to post my object to a Web API service and return an object of type ReturnedResults.
Now I need to run this post method in an ASP.net page_load event.
I have seen similar examples here, however what I need is to get my return object from my async method.
I have a long running process that is called via a Nancy Module Get method. Rather than have the browser hang while the process runs I would like this call to be asynchronous, in other words I want the Get method to return right away and leave the long running process to do its thing. I could then check the status of the process at regular intervals and act accordingly.
I was reading the following topic http://blog.stephencleary.com/2012/07/dont-block-on-async-code.html