Async in ASP.NET

Download this episode

Download Video


Async is here and it's awesome, but how do you leverage for maximum affect in a server environment? When should you use async and what shouldn't you do to avoid headaches? Hear from the ASP.NET team about async support in ASP.NET, the features, the pitfalls and most importantly the use cases that make sense in the context of an ASP.NET application.





Available formats for this video:

Actual format may change based on video formats available and browser capability.

    The Discussion

    • User profile image


    • User profile image

      We are waiting!

    • User profile image

      They sessions are coming soon folks, it takes a bit of time to get them online after the event (which was yesterday).

    • User profile image

      I'm loving how hungry everyone is for these sessions. I caught a few live but can't wait until they're posted.


    • User profile image

      Yesterday smeshterday :)

    • User profile image

      Thanks, guys! Great content!

      In particular, thanks for not just showing "what works" but also the pitfalls. Smiley

      Just a couple of notes:

      1. WhenAll will actually return the results of those tasks. So you can replace:
            await Task.WhenAll(results);
            return results.Select(t => t.Result);
            return await Task.WhenAll(results);
      2. I recommend that async/await users never use Task.Result (for the reasons you mentioned). There's a bit of overhead to use "await task" instead of "task.Result" on a completed Task, but the code is more obviously correct.



    • User profile image


      I like seeing the love for async/await, but don't understand why the only path mentioned for using it is 4.5?

      The async targeting pack is awesome!  I'd much rather you told 4.0 peeps to use that instead of making it appear that they're stuck not being able to use async/await at all!

      I'd much rather see those non-await options listed as 'stuck using VS2010' since the async targeting pack does require vs11/vs2012


    • User profile image

      This is one of the most awesome recordings among all the Channel9 videos. Thanks all of you guys for an outstanding presentation and answering all of my questions during the session Smiley 

    • User profile image

      Thanks for making async available and easy for the 'rest' of us.

    • User profile image
      Jim Lizzi

      Thanks so much for the Virtual Conference! I was setting up my application and have been extremely intrigued by WebSockets ever since the sdk came out last year. I am running VS12 on Windows 7 and whenever I try to run my websocket I get a "The IIS WebSocket module is not enabled." error. Where can I turn this on at? I see IIS 8 Express in my Add or Remove Programs, but can't seem to find it in my system. I assume it was installed with VS12?

    • User profile image


      Great event,thx... Cool

    • User profile image

      Re: Asynchronous development in VS 2010, Some - and by some, I mean ALL of us have existing applications - many of which are firmly planted in <= Net 4.0 soil. We don't have the luxury of uprooting entire codesets overnight.

      It has now been over a week. When are you going to post the video from Tibi's (@tibor19) talk??? His clever use of anonymous methods was excellent and unlike any other post/blog out there on the interwebs.

    • User profile image

      @Jim Lizzi:WebSockets in ASP.NET 4.5 requires IIS8 or IIS Express 8 on *Windows 8*. It is not available on Windows 7.

    • User profile image

      @DevDelimited:ok NOW I see it! It would have been helpful to categorize Day 2 sessions under Day 2.


    • User profile image

      Nice video guys. Great primer. I've never been more excited about the .net stack.

    • User profile image

      Can we use "async void" event handlers in web user control? I tried and failed with "An asynchronous operation cannot be started at this time. Asynchronous operations may   only be started within an asynchronous  handler or module or during certain events in the Page lifecycle. If  this exception occurred while executing a Page, ensure that the Page  is marked <%@ Page Async="true" %>.". And I'm pretty sure that I have enabled async for the container page.

    • User profile image

      Opening thread

    • User profile image
      yehuda amar


      first of all great video it's was very helpful.

      I have a question regarding sync call inside an async method.

      i have 5 I/O call in one async method 3 of them have async api that i

      can use but 2 of them are sync (request for web service without async

      api), my question is what is the best practice for this situation?

      1. i can wrap the sync calls in Task.Run or Task.Factory.StartNew and take thread from the pool but in the video you mentioned that it's could actually can hurt the concurrency.

      2. i can leave the sync call as they are but The TAP recommends that the synchronous work done by a TAP method should be
      the minimum amount possible and avoid sync long-running operation inside the async method.

      i'm little bit confuse what the correct way to go here.

      thank for advance,
      Yehuda amar.

    Comments closed

    Comments have been closed since this content was published more than 30 days ago, but if you'd like to send us feedback you canĀ Contact Us.