Example #1
0
 public void ProcessRequest(HttpContext httpContext)
 {
     ExTraceGlobals.OehCallTracer.TraceDebug(0L, "OwaEventHttpHandler.ProcessRequest");
     try
     {
         ExTraceGlobals.OehTracer.TraceDebug(0L, "Parsing request");
         OwaEventParserBase parser = this.GetParser();
         this.EventHandler.SetParameterTable(parser.Parse());
         ExTraceGlobals.OehTracer.TraceDebug <string>(0L, "Invoking event {0}", this.EventHandler.EventInfo.Name);
         if (Globals.CanaryProtectionRequired && !UserAgentUtilities.IsMonitoringRequest(httpContext.Request.UserAgent))
         {
             Utilities.VerifyEventHandlerCanary(this.EventHandler);
         }
         this.EventHandler.EventInfo.MethodInfo.Invoke(this.EventHandler, BindingFlags.InvokeMethod, null, null, null);
         this.FinishSuccesfulRequest();
     }
     catch (ThreadAbortException)
     {
         this.EventHandler.OwaContext.UnlockMinResourcesOnCriticalError();
     }
     catch (TargetInvocationException ex)
     {
         ExTraceGlobals.OehTracer.TraceDebug(0L, "Handler invocation target threw an exception");
         Utilities.HandleException(this.EventHandler.OwaContext, ex.InnerException, this.EventHandler.ShowErrorInPage);
     }
     finally
     {
         if (this.eventHandler != null)
         {
             this.eventHandler.Dispose();
         }
         this.eventHandler = null;
     }
 }
Example #2
0
        // Token: 0x06000E1D RID: 3613 RVA: 0x0005B650 File Offset: 0x00059850
        public IAsyncResult BeginProcessRequest(HttpContext httpContext, AsyncCallback callback, object context)
        {
            ExTraceGlobals.OehCallTracer.TraceDebug(0L, "OwaEventAsyncHttpHandler.BeginProcessRequest");
            IAsyncResult result = null;

            try
            {
                ExTraceGlobals.OehTracer.TraceDebug(0L, "Parsing request");
                OwaEventParserBase parser = base.GetParser();
                base.EventHandler.SetParameterTable(parser.Parse());
                ExTraceGlobals.OehTracer.TraceDebug(0L, "Invoking handler");
                object[] parameters = new object[]
                {
                    callback,
                    context
                };
                object obj = base.EventHandler.EventInfo.BeginMethodInfo.Invoke(base.EventHandler, BindingFlags.InvokeMethod, null, parameters, null);
                result = (IAsyncResult)obj;
            }
            catch (ThreadAbortException)
            {
                base.EventHandler.OwaContext.UnlockMinResourcesOnCriticalError();
            }
            catch (TargetInvocationException ex)
            {
                ExTraceGlobals.OehTracer.TraceDebug(0L, "Handler async begin invocation target threw an exception");
                Utilities.HandleException(base.EventHandler.OwaContext, ex.InnerException, base.EventHandler.ShowErrorInPage);
            }
            return(result);
        }