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)); } } }
public static HiContext Create(HttpContext context) { return(HiContext.Create(context, false)); }