Ejemplo n.º 1
0
        public void ProcessRequest(HttpContext context)
        {
            string requestId = IncidentIdGenerator.GenerateIncidentId();

            log4net.ThreadContext.Properties["requestId"] = requestId;

            internalHttpHttpHandler = (IDetergentHttpHandler)context.Application[DetergentWebHttpHandlerId];

            if (internalHttpHttpHandler == null)
            {
                throw new ConfigurationErrorsException("DetergentWebHttpHandler does not have a configured inner handler");
            }

            WebHttpContext contextWrapper = new WebHttpContext(context);

            CurrentHttpContext.Current = contextWrapper;
            contextWrapper.SetRequestId(requestId);

            IHttpResponse response = internalHttpHttpHandler.ProcessRequest(contextWrapper);

            if (response != null)
            {
                response.Send(contextWrapper);
            }
        }
Ejemplo n.º 2
0
        public void ProcessRequest(HttpContext context)
        {
            string requestId = IncidentIdGenerator.GenerateIncidentId();
            log4net.ThreadContext.Properties["requestId"] = requestId;

            internalHttpHttpHandler = (IDetergentHttpHandler)context.Application[DetergentWebHttpHandlerId];

            if (internalHttpHttpHandler == null)
                throw new ConfigurationErrorsException("DetergentWebHttpHandler does not have a configured inner handler");

            WebHttpContext contextWrapper = new WebHttpContext(context);
            CurrentHttpContext.Current = contextWrapper;
            contextWrapper.SetRequestId(requestId);

            IHttpResponse response = internalHttpHttpHandler.ProcessRequest(contextWrapper);
            if (response != null)
                response.Send(contextWrapper);
        }