Organizational Research By

Surprising Reserch Topic

Experts Most Trusted Topic


requestvalidationmode 4 5 vs 2 0 using -'asp.net,asp.net-4.5'


requestvalidationmode 4 5 vs 2 0  using -'asp.net,asp.net-4.5'

Is there a difference between requestValidationMode="4.5" and requestValidationMode="2.0"?  I have a .net 4.5 application, there is a control which I don't want to validate, as users can enter html tags in:

<asp:TextBox ID="txtTitle" runat="server" ValidateRequestMode="Disabled" />


in my web.config i have:

<compilation debug="true" strict="false" explicit="true" targetFramework="4.5">...</compilation>
<httpRuntime targetFramework="4.5" requestValidationMode="2.0"  />


initially I have put requestValidationMode="4.5" but that didn't work, I would still get the error about the tags - "A potentially dangerous Request.Form value was detected from the client ..." as soon as would submit the form. However if I set it to requestValidationMode="2.0" it works, i'm able to hit the PageLoad and encode the value from that field.
    

asked Sep 7, 2015 by rajesh
0 votes
9 views



Related Hot Questions



Government Jobs Opening


...