得到错误而返回回用的Server.Transfer() [英] Getting Error while returning back using Server.Transfer()

查看:170
本文介绍了得到错误而返回回用的Server.Transfer()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的页面(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

这篇关于得到错误而返回回用的Server.Transfer()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆