I know that this has been discussed many times, but I have a different type of question. I am seeing an error in my event viewer "A potentially dangerous Request.Form value was detected from the client (content=..."
What I do NOT want to do is to turn off validation such as this post: A potentially dangerous Request.Form value was detected from the client
So I do NOT want to do these:
validateRequest="false"
<httpRuntime requestValidationMode="2.0"/>
The issue itself is that these errors are coming from clients usually in groups of about 10. What happens is that a certain IP address will send these type of messages for a few minutes, and then stop, and then a different IP address will start the attack again in a few hours. To me it seems that a virus has taken over these computers and the virus is using them to attack my site.
The strange part is that the form in question is an error page to catch when user goes to a page that is not found (404 error). The "virus" is trying to go to a guestadd.asp page, which I don't have. There is no input field with the name "content", so am confused as how to validate a non-existing field. (Unless I am just missing it).
My question is how can I prevent this so that it does not allow it to submit? What am I doing wrong? I am able to block any info coming out, but this is quite annoying, and I don't want to be vulnerable to attack. I can post code if requested.