I will simplify the example, so let's say we have Page A
, Page B
and Page C
Page A
goes withbase.OnInit()
onpage B
,Page B
throws an exception and will be redirected withServer.Transfer
toPage C
.Page C
has a try / catch, where the exception should be catched.
I've been trying with Server.GetLastError()
, has brought nothing (GetLastErros is null). How can you solve it and deal without adding <customErrors>
in web.config
?
The interesting thing is that when I'm debugging in Page C
, I can see the variable $exception
, which is set correctly.
Image -> http://www.picfront.org/d/8EeT
Thank you very much.