Why I am getting the DotvvmInterruptRequestExecutionException?
Published: 12/5/2015 8:03:00 PMWhen you call the Context.Redirect
method in the viewmodel, DotVVM needs to interrupt processing of the current request. This is done by throwing the DotvvmInterruptRequestExecutionException
exception.
There are several flaws in this approach:
-
When you debug the project and do the redirect, Visual Studio breaks on the exception because it is not handled by your code.
-
When you call Redirect in the try/catch block, be sure to rethrow the
DotvvmInterruptRequestExecutionException
and not catch it. Otherwise, the redirect will be cancelled.
How to disable the DotvvmInterruptRequestExecutionException exception in the Visual Studio
When the DotvvmInterruptRequestExecution
is thrown, the exception info will be displayed. The only thing you need to do, is to uncheck the "Break when this exception is thrown" checkbox in Exception info.
The alternate way is to disable the Just My Code option in the Visual Studio settings.

I am the CEO of RIGANTI, a small software development company located in Prague, Czech Republic.
I am Microsoft Most Valuable Professional and the founder of DotVVM project.