Global.asax (Application_BeginRequest) basic security sample (c#)

        protected void Application_BeginRequest(object sender, EventArgs e)
        {
            string q = Request.QueryString.ToString().ToLower();
            if (q.Contains("delete") | q.Contains("update") | q.Contains("drop") | q.Contains("exec"))
            {
                Response.Redirect("error.aspx");
            }
        }

Yorumlar