I tried this on a SurfaceController, an AsyncController and a regular Controller. When I run this code in a separate (not umbraco) project, the code just runs fine and returns JSON.
Also I have tried adding the following line to my web.config on the httpRuntime node:
I've been having the same problem as well in Umbraco 7 (fresh install, no upgrade), I tried applying the SessionState attribute as well to my custom Controller but no luck. Has there been any more success with this?
I'm facing the same problem running Umbraco 7.0.4. I also tried to put the [SessionState(SessionStateBehavior.ReadOnly)] attribute, but it didn't work. Any ideas?
I've been experiencing this for quite a while in all my recent Umbraco projects (v6 and v7). They all required async operations but I kept getting the System.Threading.Tasks.Task'1[System.Web.Mvc.ActionResult] output rendered instead of the correct view.
I figured out how to reproduce this. It seems that when a controller implements IRenderMvcController, any async Index() action will render the code output above, but if you replace this action with one of the same name of the current page's template name, the view is rendered correctly.
Asynchronous action Umbraco v6
Dear all,
I made an asynchronous Action:
But whenever I call this action, I always receive the following message:
I tried this on a SurfaceController, an AsyncController and a regular Controller. When I run this code in a separate (not umbraco) project, the code just runs fine and returns JSON.
Also I have tried adding the following line to my web.config on the httpRuntime node:
As a reference I used: http://www.asp.net/mvc/tutorials/mvc-4/using-asynchronous-methods-in-aspnet-mvc-4
Am I missing something? Does anyone know if it's possible to have asynchronous actions in Umbraco?
Thanks!
I'm experiencing this too, I've seen the problem in other frameworks that wrap around the MVC pipeline but I'm not sure what the fix is.
I just wanted to jump in, I just saw this same behavior in umbraco 6.1.6. Is there any solution yet?
A workaround is to use an attribute to set the session readonly:
Of course you can only read your session object, not modify. But it might help you anyway.
I've been having the same problem as well in Umbraco 7 (fresh install, no upgrade), I tried applying the SessionState attribute as well to my custom Controller but no luck. Has there been any more success with this?
I'm facing the same problem running Umbraco 7.0.4. I also tried to put the [SessionState(SessionStateBehavior.ReadOnly)] attribute, but it didn't work. Any ideas?
Any news on this one? I'm facing the same problem.
Experiencing the same thing here.
I asume it's because Umbraco has hooked into the ASP.Net MVC controller pipeline.
Any workarounds?
I have managed to get this working in v7 at least.
More details here http://stackoverflow.com/questions/23006976/async-controller-action-with-umbraco-7-returns-string
Issue created here
http://issues.umbraco.org/issue/U4-5208
I've added a work around to that stack overflow thread if you want to have this fixed before the next release is out.
I've been experiencing this for quite a while in all my recent Umbraco projects (v6 and v7). They all required async operations but I kept getting the
System.Threading.Tasks.Task'1[System.Web.Mvc.ActionResult]
output rendered instead of the correct view.I figured out how to reproduce this. It seems that when a controller implements
IRenderMvcController
, any asyncIndex()
action will render the code output above, but if you replace this action with one of the same name of the current page's template name, the view is rendered correctly.I've written about it here if anyone fancies having a read.
is working on a reply...