void Application_Error(object sender, EventArgs e) { Exception objErr = Server.GetLastError();string strErrorMsg = objErr.Message; Response.Write(strErrorMsg); // 이벤트 로그에 기록 // System.Diagnostics.EventLog.WriteEntry("page.aspx", "err msg", System.Diagnostics.EventLogEntryType.Error); Server.ClearError(); }