Пример #1
0
        private void Application_BeginRequest(object source, System.EventArgs e)
        {
            this.currentApplicationType = HiConfiguration.GetConfig().AppLocation.CurrentApplicationType;
            HttpApplication httpApplication = (HttpApplication)source;
            HttpContext     context         = httpApplication.Context;

            if (context.Request.RawUrl.IndexOfAny(new char[]
            {
                '<',
                '>',
                '\'',
                '"'
            }) != -1)
            {
                context.Response.Redirect(context.Request.RawUrl.Replace("<", "%3c").Replace(">", "%3e").Replace("'", "%27").Replace("\"", "%22"), false);
            }
            else
            {
                this.CheckInstall(context);
                if (this.currentApplicationType != ApplicationType.Installer)
                {
                    HiHttpModule.CheckSSL(HiConfiguration.GetConfig().SSL, context);
                    HiContext.Create(context, new UrlReWriterDelegate(HiHttpModule.ReWriteUrl));
                }
            }
        }
Пример #2
0
 public static HiContext Create(HttpContext context)
 {
     return(HiContext.Create(context, false));
 }