我将简化示例,假设我们有Page A,Page B和Page C
Page A继续,base.OnInit()_page BPage B抛出异常并将被重定向Server.Transfer到 toPage C。Page C有一个 try/catch,应该在其中捕获异常。
我一直在尝试Server.GetLastError(),没有带来任何东西(GetLastErros 为空)。你怎么能在不添加<customErrors>的情况下解决它和处理web.config?
有趣的是,当我在 中调试时Page C,我可以看到$exception设置正确的变量。
图片 -> http://www.picfront.org/d/8EeT
非常感谢。