Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Pete Field 4 posts 24 karma points
    Apr 11, 2014 @ 16:19
    Pete Field

    Umbraco v7 async controller action

    Is it possible to use an async action within an Umbraco SurfaceController (and UmbracoApiController)

    I tried the following code

    public async Task< ActionResult> HandleLogin(LoginViewModel model)
        await Task.Delay(1000);
        return PartialView("Login", model);

    and although it compiled correctly when the action is called the action seems to return as soon as the await is hit, and returns a string


    the controller of course inherits from SurfaceController and I wonder if this is the problem?

    If this is not possible, are there any workarounds to achieve async action behaviour?

  • Lior 2 posts 51 karma points
    May 14, 2014 @ 10:01

    Hi Pete,

    Did you find any soultion?


  • Pete Field 4 posts 24 karma points
    May 14, 2014 @ 10:19
Please Sign in or register to post replies

Write your reply to: