Questions tagged [asynccontroller]

51 questions
25
votes
4 answers

Asynchronous methods of ApiController -- what's the profit? When to use?

(This probably duplicates the question ASP.NET MVC4 Async controller - Why to use?, but about webapi, and I do not agree with answers in there) Suppose I have a long running SQL request. Its data should be than serialized to JSON and sent to browser…
15
votes
1 answer

Implementing a Progress bar for long running task implemented with an ASP.NET MVC 2 AsyncController

After reading the documentation on AsyncControllers in ASP.NET MVC 2, I am wondering what's the best way to implement an ajax progress bar in this scenario. It seems a bit odd that the tutorial does not cover this at all. I guess implementing an…
Adrian Grigore
  • 33,034
  • 36
  • 130
  • 210
10
votes
2 answers

Building unit tests for MVC2 AsyncControllers

I'm considering re-rewriting some of my MVC controllers to be async controllers. I have working unit tests for these controllers, but I'm trying to understand how to maintain them in an async controller environment. For example, currently I have an…
ChrisW
  • 9,151
  • 1
  • 20
  • 34
10
votes
1 answer

asynchronous http request handling with tomcat and spring

It's my first SO question so be patient with me :) I'm trying to create a service that: Receives HTTP GET requests containing a URL to query For a single GET request the service extracts the URL Queries a local DB about the URL If a result was…
Gideon
  • 2,211
  • 5
  • 29
  • 47
5
votes
1 answer

How does AsyncController avoid using an ASP.NET worker thread?

How exactly does AsyncController avoid using an ASP.NET worker thread? If I use the event-based pattern (pseudo-code): [AsyncTimeout(60000)] public void WaitForWakeUp() { AsyncManager.OutstandingOperations.Increase(); EventRaisedElsewhere…
clonedog
  • 51
  • 2
5
votes
2 answers

Can ASP.NET MVC's AsyncController be used to service large number of concurrent hanging requests (long poll)?

Frameworks like Node.js, Tornado, and Twisted let developers create server-push applications that supports large number of concurrent hanging requests (10k+). From what I understand, they all achieve this by not creating threads to service each…
David H
  • 2,901
  • 1
  • 26
  • 21
5
votes
1 answer

ASP.NET MVC AsyncController xxxCompleted

When implementing ASP.NET MVC AsyncController the xxxCompleted method has to be Public. I'm wondering if this means the xxxCompleted method can be invoked directly, or if this is protected internally using NonAction or something similar? Thanks.
5
votes
2 answers

ASP.NET MVC 2 asynchronous action with timeout

I want to write an asynchronous action in ASP.NET MVC 2 that waits up to 5 seconds for an event to occur. If the event occurs then the server responds with a result, otherwise the request times out. What is the best way to achieve this?
thatismatt
  • 9,832
  • 10
  • 42
  • 54
4
votes
1 answer

T4MVC AsyncController

I've recently installed T4MVC using Nuget. I had an old version before this that worked fine, however I had a new requirement that needed an asynchronous controller. After creating the asynchronous controller my project would not compile due to…
Ryan Worsley
  • 655
  • 1
  • 4
  • 17
4
votes
1 answer

How to write tests for ASP.NET MVC 3 AsyncControllers with MSpec

I want to write a TaskController for an ASP.NET MVC 3 application to some long running tasks, like sending a newsletter to the users of the site. I thought using an AsyncController would be appropriate as sending emails might take a while, and I…
Sergi Papaseit
  • 15,999
  • 16
  • 67
  • 101
4
votes
2 answers

how to use AsyncController in MVC application using Ninject for DI?

Does anyone know how to use an AsyncController in a mvc application that uses Ninject for DI? AsyncController works fine when i dont use ninject but i cant make them work together. I added following in my sitemodule but no…
user461943
  • 43
  • 4
3
votes
2 answers

Best way of handling timeouts with AsyncController

I have a long time polling controller in my MVC3 project. It has its timeout set to 30 seconds. I have a HandleErrorAttribute implementation that handles logging of all errors. Since the timout throws a TimeoutException it means these will be…
Anders
  • 17,306
  • 10
  • 76
  • 144
3
votes
1 answer

How work with AsyncController in asp.net MVC 3?

Search several blogs about it but always are same examples. I dunno if misunderstood or'm not knowing use but see no parallel process when work with AsyncController. The following tests performed Create a new project of type Asp.net…
ridermansb
  • 10,779
  • 24
  • 115
  • 226
3
votes
1 answer

ASP.NET MVC AsyncController continue browsing while waiting

I want to use jQuery ajaxForm to post data to an AsyncController to fire off some task. I want the user to be able to continue browsing to other pages while this task completes. I then want to display a status message using something like jGrowl…
autonomatt
  • 4,393
  • 4
  • 27
  • 36
3
votes
1 answer

Async operation completes, but result is not send to browser

I want to implement a webchat. The backend is a dual WCF channel. Dual channel works in the console or winforms, and it actually works on the web. I can at least send and receive messages. As a base I used this blog post so, the async operation…
esskar
  • 10,638
  • 3
  • 36
  • 57
1
2 3 4