开发者

ASP.NET MVC's AsyncController and Session data

开发者 https://www.devze.com 2023-01-12 18:46 出处:网络
We have a somewhat complex and long-running action method for which we\'d like to show a p开发者_Python百科rogress bar.The javascript grid that we\'re using requires that saving and loading data be do

We have a somewhat complex and long-running action method for which we'd like to show a p开发者_Python百科rogress bar. The javascript grid that we're using requires that saving and loading data be done in a single request (save first then load), and also requires us saving data to session.

Our initial thought was to just use an AsyncController, but the method obviously failed since it accesses (and saves to) session state. Since we cannot split up the action due to the javascript grid, is there any other option?


You could use a service bus and send a message to this. Granted this might be overkill for what you are doing but could be worth a look.

Search SO for rhinobus, masstransit or nservicebus. These would allow you to send a message asynchronously but you have to setup the application that subscribes to this message.

0

精彩评论

暂无评论...
验证码 换一张
取 消