62,025
社区成员
发帖
与我相关
我的任务
分享
void Application_Error(object sender, EventArgs e)
{
// 在出现未处理的错误时运行的代码
Result result = new Result();
result.code = "-1";
result.msg = Server.GetLastError().ToString();
if (Context != null)
Context.ClearError();
Response.ContentType = "text/plain";
Response.Write(new System.Web.Script.Serialization.JavaScriptSerializer().Serialize(result));
}