In both contexts, same code, same application , same routes, only controller action differs.
synchronous controller - gets called once
public void Index(string parameters)
// called only once
asynchronous controller actions - gets called lots of times
public void IndexAsync(string parameters)
// called many times (per image etc on the page)
public ActionResult IndexCompleted()
does anyone understand/know why the same routes/actions pick up all the extra requests when I make the controller action asynchronous..?
any help would be very much appreciated,
Fire up fiddler and see how the image requests are coming across in both cases. If they come up once for the synchronous method and the browser then realizes it can cache this image or not. Are the URL/Parameters combination the same in the async, sync method?
Please post the responses here on what you see with Fiddler if you can. If you download a demo project at http://msdn.microsoft.com/en-us/library/ee728598.aspx does the same thing happen for you there? Im gathering not which makes me think its a caching issue (off the top of my head).
I know you mention 'same routes' above, but same route and parameters in both cases?