/// <summary> /// Standard entry point of IHttpHandler, main processing flow. /// </summary> public void ProcessRequest(HttpContext context) { log4net.ILog log = PtaUtil.getLog4netLogger(this.GetType().FullName + ".ProcessRequest(): "); try { this.context = context; String guid = context.Request.Form["ourguid"]; bboardDR = PtaUtil.GetBBoardDataReaderByGuid(guid); onErrorServerTransfer = PtaUtil.GetDBReaderStringField(bboardDR, "OnErrorServerTransfer"); RequestValidator rv = new RequestValidator(bboardDR); rv.Validate(context.Request); Redirect(); } catch (System.Threading.ThreadAbortException) { //this is normal processing of Server.Transfer() and Response.End() throw; } catch (Exception e) { PtaUtil.LogExceptionAndFormParameters(log, e); //String on_err_st = onErrorServerTransfer; //if (on_err_st == null) on_err_st = PtaUtil.GetProxyWebFolder() + "ErrorPages/PtaDefaultErrPage.aspx"; //context.Server.Transfer(on_err_st, true); String back_link = context.Request.Form["tcbaseurl"] + context.Request.Form["returnurl"]; String err_page = PtaUtil.GenerateSimpleErrorPage(back_link); context.Response.Write(err_page); log.Debug("onErrorServerTransfer: " + onErrorServerTransfer); if (onErrorServerTransfer != null) { context.Server.Transfer(onErrorServerTransfer, true); } /* else { * back_link = context.Request.Form["tcbaseurl"] + context.Request.Form["returnurl"]; * context.Response.Write("Your request could not be processed. <br/>"); * context.Response.Write("Back to Blackboard: " + "<a href=\"" + back_link + "\">" + back_link + "</a><br/>"); * }*/ //throw; } finally { PtaUtil.CloseDataReader(drParam); PtaUtil.CloseDataReader(drMenuLink); PtaUtil.CloseDataReader(bboardDR); } }