Exemple #1
0
 void Application_BeginRequest(object sender, EventArgs e)
 {
     try
     {
         logic.Process(Request, Response, this);
     }
     catch (Exception ex)
     {
         Server.ClearError();
         Response.Clear();
         var page = new Http.ErrorPage(Http.ResponseCode.INTERNAL_SERVER_ERROR, "Internal error. (" + ex.Message + ")");
         Response.BinaryWrite(System.Text.Encoding.Default.GetBytes(page.ToString()));
         Response.StatusCode = (int)Http.ResponseCode.INTERNAL_SERVER_ERROR;
         Response.Flush();
         CompleteRequest();
     }
 }
Exemple #2
0
 void Application_BeginRequest(object sender, EventArgs e)
 {
     try
     {
         logic.Process(Request, Response, this);
     }
     catch (Exception ex)
     {
         Server.ClearError();
         Response.Clear();
         var page = new Http.ErrorPage(Http.ResponseCode.INTERNAL_SERVER_ERROR, "Internal error. (" + ex.Message + ")");
         Response.BinaryWrite(System.Text.Encoding.Default.GetBytes(page.ToString()));
         Response.StatusCode = (int)Http.ResponseCode.INTERNAL_SERVER_ERROR;
         Response.Flush();
         CompleteRequest();
     }
 }