得到错误而返回回用的Server.Transfer()回回、而返、错误、Transfer

2023-09-05 00:48:52 作者:蹲在街角的哭泣

我的页面(Default1.aspx),其中我将重定向到使用的Server.Transfer()方法的另一页(Default2.aspx)。页面后处理Default2.aspx完成,执行返回到Default1.aspx,但在那个时候,我发现了异常:

I have page (Default1.aspx) in which I am redirecting to another page (Default2.aspx) using Server.Transfer() method. After the page processing completed in Default2.aspx, execution returns back to Default1.aspx, but at that time I'm getting the exception:

无法评估EX pression因为code优化或本机框架调用堆栈的顶部。

Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack.

为什么我得到这个,我怎么可以使用的Server.Transfer()方法时避免这种情况?

Why am I getting this and how can I avoid this when using the Server.Transfer() method?

推荐答案

尝试使用使用Server.Execute方法来代替。如果它有助于它可能是你正在运行到在 http://support.microsoft说明情况.COM / KB / 312629 / EN-US

Try using Server.Execute method instead. If it helps it might be that you are running into situation described at http://support.microsoft.com/kb/312629/en-us

 
精彩推荐