Ext.Net.MVC 3.1: Async/Await direct methods.

  1. #1

    Ext.Net.MVC 3.1: Async/Await direct methods.

    Hello,

    I try to use async/await in DirectMethods, but I get "App.direct.Method is undefined" error.

    code
        [DirectController]
        public class MyController : Controller
        {
            [DirectMethod(Timeout = 300000, ShowMask = true, Target = MaskTarget.Page)]
            public async Task<ActionResult> Method(string data)
            {
                string text = await Task<string>.Factory.StartNew(() => { return data; });
    
                return Json(new { text = text });
            }
        }
    I saw this link http://forums.ext.net/showthread.php...th-async-await
    but I couldn't find RegisterAsyncTask method in controller.

    Is there some ways to use async/await with DirectMethods?
    Last edited by Yury; May 25, 2015 at 9:11 AM.
  2. #2
    Hello,

    Somebody knows how to use async/await action methods with Ext.Net.MVC?

    I've tried to use async/await actions with ComponentLoader, but it doesn't work. As I can see it is problem for ext.net in general.
  3. #3
    Hi Yury,

    Yes, it is not supported.

    There is something that could make it working in some scenarios.
    http://forums.ext.net/showthread.php...l=1#post120588

    Though, I could not get it working in MVC.

    Logged in GitHub as a feature request.
    https://github.com/extnet/Ext.NET/issues/946

    Though, I cannot provide any time frame and would recommend not to expect it is going to appear soon.

Similar Threads

  1. Replies: 3
    Last Post: Apr 01, 2015, 7:36 PM
  2. Direct Methods and Custom Control
    By Zdenek in forum 1.x Help
    Replies: 0
    Last Post: Apr 19, 2012, 10:18 PM
  3. [CLOSED] Async with direct Event
    By imaa in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Aug 09, 2011, 9:46 PM
  4. Are direct methods same as WebMethod
    By deeptechtons in forum 1.x Help
    Replies: 2
    Last Post: Dec 27, 2010, 3:31 AM

Posting Permissions