Esempio 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);
            }
        }
Esempio 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);
        }