private void Context_PostRequestHandlerExecute(object sender, EventArgs e)
        {
            if (!Configuration.Enabled || !AllowApplicationObject(sender as HttpApplication))
            {
                return;
            }

            HttpApplication app           = (HttpApplication)sender;
            HttpContext     context       = app.Context;
            string          filePath      = context.Request.FilePath;
            string          fileExtension = VirtualPathUtility.GetExtension(filePath);

            if (fileExtension != null && fileExtension.Equals(".aspx"))
            {
                var page = ((System.Web.UI.Page)context.CurrentHandler);
                if (page != null)
                {
                    LoggingPage.LogViewState(context, page, before: false);
                    LoggingPage.LogSession(context, page, requestForm: null, before: false);
                }
            }
        }
 public void Page_PreLoad(object sender, EventArgs e)
 {
     LoggingPage.LogViewState(HttpContext.Current, (Page)sender, before: true);
 }