public static void HandleError(HttpServerUtilityBase server, HttpResponseBase response, CustomErrorsSection customErrorsSection) { CustomError customError = GetCustomError(server.GetLastError(), customErrorsSection); server.ClearError(); response.Clear(); response.WriteFile(customError.Redirect); response.StatusCode = customError.StatusCode; }
public static bool HandleDeprecatedFilePathsException(Exception exception, HttpServerUtilityBase server, SubtextApplication application) { var depecratedException = exception as DeprecatedPhysicalPathsException; if (depecratedException != null) { server.Execute(DeprecatedPhysicalPathsPage, false); server.ClearError(); application.FinishRequest(); return true; } return false; }