public void ProcessRequest(HttpContext context)
        {
            Stream content = context.Request.InputStream;
            string strJson = "", strType = context.Request.QueryString["type"];
            if (content.CanRead)
            {
                byte[] bContent = new byte[1024000];
                content.Read(bContent, 0, context.Request.ContentLength);
                strJson = context.Request.ContentEncoding.GetString(bContent);
            }
            if(!string.IsNullOrEmpty(strJson))
            {
                if (strType == "resource")
                {
                    JsonPerformanceResourceTiming[] resources = JsonConvert.DeserializeObject<JsonPerformanceResourceTiming[]>(strJson);
                }
                else if(strType == "page")
                {
                    string strIP = context.Request.UserHostAddress, strURL = context.Request.Url.AbsoluteUri, strLanguages = string.Join(";", context.Request.UserLanguages);
                    JsonPerformanceTiming jsonTiming = JsonConvert.DeserializeObject<JsonPerformanceTiming>(strJson);

                    PerformanceTiming timing = new PerformanceTiming(jsonTiming);
                    timing.IP = strIP;
                    timing.URL = strURL;
                    timing.UserLanguages = strLanguages;
                    PerformanceTiming.Save(timing);

                }

            }
            context.Response.ContentType = "text/plain";
            context.Response.Write("");
        }
 public static int Save(PerformanceTiming _Entity)
 {
     if (null == _Entity)
         return -1;
     return EntityAccess<PerformanceTiming>.Access.Save(_Entity);
 }