<%@ Import Namespace="System.Web.Mail" %>
<script language="C#" runat="server">
void Error_500(Object sender, EventArgs e) {
String foo = null;
Response.Write(foo.ToString());
}
void Page_Error(Object sender, EventArgs e) {
String message = " "
+ "
+ "
+ "";
Response.Write(message);
Response.Write("此服务器上发生了错误,已通知该站点的管理员。");
MailMessage mail = new MailMessage();
mail.From = "hollo08@hotmail.com";
mail.To = "hollo08@126.com";
mail.Subject = "站点错误";
mail.Body = message;
mail.BodyFormat = MailFormat.Html;
SmtpMail.Send(mail);
Server.ClearError();
}
</script>
<script language="C#" runat="server">
void Error_500(Object sender, EventArgs e) {
String foo = null;
Response.Write(foo.ToString());
}
void Page_Error(Object sender, EventArgs e) {
String message = " "
+ "
" + Request.Url.ToString() + "
"+ "
" + Server.GetLastError().ToString() + ""
+ "";
Response.Write(message);
Response.Write("此服务器上发生了错误,已通知该站点的管理员。");
MailMessage mail = new MailMessage();
mail.From = "hollo08@hotmail.com";
mail.To = "hollo08@126.com";
mail.Subject = "站点错误";
mail.Body = message;
mail.BodyFormat = MailFormat.Html;
SmtpMail.Send(mail);
Server.ClearError();
}
</script>