예제 #1
0
파일: MyModule.cs 프로젝트: tzkwizard/sqs
        public void context_BeginRequest(object sender, EventArgs e)
        {
            HttpApplication application   = (HttpApplication)sender;
            HttpContext     context       = application.Context;
            HttpResponse    response      = context.Response;
            HttpRequest     request       = context.Request;
            string          ipAddress     = context.Request.UserHostAddress;
            string          requestHeader = context.Request.Headers.ToString();

            ELSLog esLog = new ELSLog();

            esLog.ElsIpaddress = ipAddress;
            esLog.ElsRequest   = "[" + DateTime.Now.ToString("dd/MMM/yyyy:HH:mm:ss zz") + "]" + " \"" + request.HttpMethod + " "
                                 + request.Path + "\" " + response.StatusCode + " 2 " + "\"" + request.UrlReferrer + "\" " + "\"" + request.UserAgent + "\"";

            /*    if (HttpContext.Current.Session != null)
             *  {
             *     // context.Session[Userlog] = esLog;
             *      Session[Userlog] = esLog;
             *  }*/
            context.Items[Userlog] = esLog;



            if (!request.RequestType.Equals("GET"))
            {
                Queuestore q = new Queuestore();
            }
        }
예제 #2
0
파일: MyModule.cs 프로젝트: tzkwizard/sqs
        public void context_EndRequest(object sender, EventArgs e)
        {
            HttpApplication application = (HttpApplication)sender;
            HttpContext     context     = application.Context;
            HttpResponse    response    = context.Response;
            string          s           = response.Status;
            Queuestore      q           = new Queuestore();


            q.SendQueueAsyncAll(1, s);
        }