Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
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
System.Threading.Tasks.Task`1[System.Web.Mvc.ActionResult]
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?
Hi Pete,
Did you find any soultion?
Hi,
Yep, sorry should have updated this.
There are details here http://stackoverflow.com/questions/23006976/async-controller-action-with-umbraco-7-returns-string/23033649#23033649
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Umbraco v7 async controller action
Is it possible to use an async action within an Umbraco SurfaceController (and UmbracoApiController)
I tried the following code
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?
Hi Pete,
Did you find any soultion?
Hi,
Yep, sorry should have updated this.
There are details here http://stackoverflow.com/questions/23006976/async-controller-action-with-umbraco-7-returns-string/23033649#23033649
is working on a reply...