I did search and read so many posts talk about the error message "A potentially dangerous request.querystring value was detected from the client". But, I believe my problem is totally different.
In my web.config file, I already defined two keys below:
<httpRuntime requestValidationMode="2.0" />
<pages validateRequest="false" />
So, if I publish my project (asp.net webform) without using Precompile option, everything will work smoothly as my expected.
However, if I publish my project with Precompile option (precompile all site), the error above will always occur when I submit a form.
The submit form is so simple, it contains one input text control and one submit button. And my input text was
<script>alert(1)</script>
So, my question is why this issue happens with precompile publish build? Any advice for me?
What I have tried:
Put two keys below in web.config does not solve the problem.
<httpRuntime requestValidationMode="2.0" />
<pages validateRequest="false" />