在配制节里加个debug的节,在页面重写 protected override void OnError(System.EventArgs e) ,在错误处理前判断这个配制节.
globa 里面的方法
protected void Application_Error(Object sender, EventArgs e)
{
string error=Server.GetLastError().InnerException.Message;
if (Context != null )
Server.Transfer("WebForm2.aspx?error="+error, false);
}