asp.net - Security and SQL injection in Sql Server with ASP membership -


I am implementing ASP MVV with membership.

  1. SQL injection brute force attack
  2. How can I stop / lock the IP based on user's IP

I have the answer to the first question. You will have to store some useful data in "session [data]" and it will not be sent from the customer side.

  Public Action Index () {try (if (WebSecurity.IsAuthenticated) {String Contract ID_string = Sessions ["Contract ID"]. Toasting ();  

Without using it, do not use some string input value from the client without checking.

Use the best method

in control

  [http post ] [Validantiophorgetin] Public ActionStrust _SaveMail (email_optsmail)  

These views

  @ (Ajax. Beniform ("_makemail", " Nominate ", Model, New Ajax Option {UpdateTargetId =" Email_Options ", Onfileur =" Alert ('Err)', Onsut = "Removed Arrays ('#form_' + ViewBag.Contract_part +" ')'}, html Content: New {Id = "form_" + ViewBag.Contract_part}) {@ Html.AntiForgeryToken () @ Html.ValidationSummary () & lt; table id = "email_Options"> gt; & lt; tbody & gt; & gt; tr & gt; ; & Lt; th & gt; @ HTML.LabelFor (m = & gt; Model. Email, new {style = "font-size: 1.05em;"}}))  & lt; th & Gt; @ Html.HiddenFor (m = & gt; Model.ContractID) @ Html.EditorFor (m => Model.Email) @ Html.ValidationMessageFor (m => Model.Email) & lt; Button style = "font-size: 1em; margin: 0 px; padding: 0;" type = "presented" & gt; Search & lt; / Button & gt; & Lt; / Th & gt; & Lt; / TR & gt; & Lt; TR & gt; & Lt; Th & gt; @ HTML.LabelFor (m => Model SendToEmail, new {@class = "checkbox"}) & lt; / Th & gt; & Lt; Th & gt; @ Html.CheckBoxFor (m => Model SendToEmail) & lt; / Th & gt; & Lt; / TR & gt; & Lt; TR & gt; & Lt; Th & gt; @ Html.LabelFor (m => Model. Centaur, New {@class = "Checkbox"}) & lt; / Th & gt; & Lt; Th & gt; @ Html.CheckBoxFor (m => Model SentToHome) & lt; / Th & gt; & Lt; / TR & gt; & Lt; TR & gt; & Lt; Th & gt; @ HTML.LabelFor (m => Model. Print, new {@class = "checkbox"}) & lt; / Th & gt; & Lt; Th & gt; @ Html.CheckBoxFor (m => model print) & lt; / Th & gt; & Lt; / TR & gt; & Lt; / Tbody & gt; & Lt; / Table & gt; }  

Comments

Popular posts from this blog

winforms - C# Form - Property Change -

java - Messages from .properties file do not display UTF-8 characters -

javascript - amcharts makechart not working -