Questions tagged [asynccontroller]
51 questions
3
votes
1 answer
AsyncController OutputCache
When implementing an asynchronous controller action in ASP.NET MVC, if I want to output cache the ActionResult, which method do I put the OutputCache attribute on?
public class PortalController : AsyncController {
/// HERE...?
…

Jacob Krall
- 28,341
- 6
- 66
- 76
3
votes
1 answer
ASP.Net MVC AsyncController log request processing time
I need to get request processing time for asp.net MVC. i use IHttpModule subscribing for onBeginRequest and onEndRequest events. For sync controllers it works great but for async it returns wrong result(for example 20ms when real time was about…

VladK
- 105
- 7
2
votes
0 answers
Async controller child action in MVC 4
public class SomeController : AsyncController{
[ChildAction]
public Task DoSomething(){ ... }
}
If I were to call the above action from inside a view of a normal controller, what would happen? e.g.
…

Alwyn
- 8,079
- 12
- 59
- 107
2
votes
1 answer
Asynchronous and synchronous action methods in the same controller
Is possible to have asynchronous and synchronous action methods in an AsyncController? Is there any drawback doing this?
The reason is that an asynchronous operation makes sense for a time consuming operation, but does not make sense for return a…

vtortola
- 34,709
- 29
- 161
- 263
2
votes
1 answer
Can I use async controllers in the following scenario?
I have an application in Asp.net MVC where at some point I would like to display a modal dialog to the user that would display process execution progress indicator.
The process behind the scenes does a lot of database data processing (based on…

Robert Koritnik
- 103,639
- 52
- 277
- 404
2
votes
1 answer
ASP.NET MVC2 Can AsyncController access HttpContext.Current?
I'm trying to convert this method ExportTo3rdParty() to use an AsyncController:
public JsonResult SaveSalesInvoice(SalesInvoice invoice)
{
SaveInvoiceToDatabase(invoice); // this is very quick
ExportTo3rdParty(invoice); // this is very slow…

JK.
- 21,477
- 35
- 135
- 214
2
votes
1 answer
ASP.NET MVC2 Call AsyncController method from jQuery?
I'm trying to learn how to use AsyncController in MVC2, but there is very little documentation/tutorials out there. I'm looking to take one normal controller method that has a very slow export to a 3rd party service and convert that to an async…

JK.
- 21,477
- 35
- 135
- 214
2
votes
0 answers
Async redirect in Grails 3.0
Async redirect in grails 3.0 controller fails.
Below is sample controller snippet;
import static grails.async.Promises.*
class WaitController {
def index() {
if (request.asyncContext) {
render 'index sync'
} else {
…

tepsl
- 35
- 8
2
votes
1 answer
Async ActionResult implementation is blocking
Okay,
Here I have an MVC 4 application and I am trying to create an Asynchronous ActionResult with in that.
Objective : User has a download PDF Icon on the WebPage, and downloading takes much of time. So while server is busy generating the PDF, the…

Anurag Choudhary
- 113
- 12
2
votes
1 answer
C# Async MVC method returns ContentResult System.Threading.Tasks.Task`1[System.Web.Mvc.JsonResult]
I'm trying to convert some methods to async and have started off with a simple example within the controller I am modifying:
public class MyAPIController : AsyncController
{
public async Task List()
{
return Json(123456,…

Ross
- 91
- 1
- 5
2
votes
1 answer
MVC3 Async Controllers for async loading from Entity Framework
To improve performance of our MVC3 application we want to mark some Controller's to AsyncController.
We use EF 4.x (latest stable), and need some advices, links how to make async calls to EF in a proper way. How to Dispose Entities etc.
If its…

Maxim
- 1,555
- 5
- 18
- 28
1
vote
1 answer
Is it possible to have both GET and POST asynchronous controller actions of the same name?
Is it possible to have an AsyncController that has a GET and POST action of the same name?
public class HomeController : AsyncController
{
[HttpGet]
public void IndexAsync()
{
// ...
}
[HttpGet]
public ActionResult…

Dismissile
- 32,564
- 38
- 174
- 263
1
vote
1 answer
AsyncController: Interference having 2 async methods
i'm having an AsyncController that has 2 AsyncMethods.
One is called GetMessages, the other Check.
It seems, that one call blocks the other, probably because both call this.AsyncManager.OutstandingOperations.Increment();
Do they share the same…

esskar
- 10,638
- 3
- 36
- 57
1
vote
4 answers
Autofac, OrchardProject and AsyncControllers
I'm working on trying to get an AsyncController to work in OrchardProject. The current version I'm using is 2.2.4.9.0.
I've had 2 people eyeball my code: http://www.pastie.org/2117952 (AsyncController) which works fine in a regular MVC3 vanilla…

Dregalia
- 13
- 3
1
vote
0 answers
asynccontrols asp.net Error Creating Control " Object reference not set to an instance of an object"
here is my sample form.
I'm using asynccontrols
. Site compiles fine, loads fine, works fine. Can't view anything in designer. Halp?
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Calendar2.aspx.cs" Inherits="txssaAuction.Calendar2" %>
…

Arian
- 325
- 1
- 15