Tengo esta ...¿Cómo se maneja una excepción con AsyncController de ASP.net MVC?
public void FooAsync()
{
AsyncManager.OutstandingOperations.Increment();
Task.Factory.StartNew(() =>
{
try
{
doSomething.Start();
}
catch (Exception e)
{
AsyncManager.Parameters["exc"] = e;
}
finally
{
AsyncManager.OutstandingOperations.Decrement();
}
});
}
public ActionResult FooCompleted(Exception exc)
{
if (exc != null)
{
throw exc;
}
return View();
}
¿Hay una mejor manera de pasar una excepción volver a ASP.net?
Cheers, Ian.