1

I am using nhibernate in an open session per view approach where the session opens before the action method and closes right after.

Using an AsyncController makes this model break because the controller performs data operations even when it has returned from the original XXXAsync method but it finds a null session while the HttpContext.Current is null as well.

Is there any way to fix this issue?

Kris van der Mast
  • 16,343
  • 8
  • 39
  • 61
Yannis
  • 6,047
  • 5
  • 43
  • 62

1 Answers1

0

Well you should modify the code that opens the session and closes it right after the action so that it closes it after the XXXCompleted action.

Darin Dimitrov
  • 1,023,142
  • 271
  • 3,287
  • 2,928