You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1.3 KiB

  1. using Swift.DAL.SwiftDAL;
  2. using Swift.web.Library;
  3. using System;
  4. using System.Web;
  5. using System.Web.UI;
  6. namespace Swift.web
  7. {
  8. public class Global : System.Web.HttpApplication
  9. {
  10. protected void Application_Start(object sender, EventArgs e)
  11. {
  12. }
  13. protected void Session_Start(object sender, EventArgs e)
  14. {
  15. }
  16. protected void Application_BeginRequest(object sender, EventArgs e)
  17. {
  18. }
  19. protected void Application_AuthenticateRequest(object sender, EventArgs e)
  20. {
  21. }
  22. protected void Application_Error(object sender, EventArgs e)
  23. {
  24. //return;
  25. HttpException err = Server.GetLastError() as HttpException;
  26. DbResult dr = new DbResult();
  27. if (err != null)
  28. {
  29. var page = HttpContext.Current.Request.Url.ToString();
  30. dr = GetStatic.LogError(err, page);
  31. }
  32. Server.ClearError();
  33. var url = GetStatic.GetVirtualDirName() + "/Error.aspx";
  34. //Response.Redirect(url + "?id=" + dr.Id);
  35. Server.Transfer(url + "?id=" + dr.Id);
  36. }
  37. protected void Session_End(object sender, EventArgs e)
  38. {
  39. }
  40. protected void Application_End(object sender, EventArgs e)
  41. {
  42. }
  43. }
  44. }