Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
999 views
in Technique[技术] by (71.8m points)

asp.net - A potentially dangerous Request.Form value was detected from the client

I'm getting the above exception when I'm trying to submit a form in ASP.NET. This post was really helpful but even after setting ValidateRequest="false" I get this error only for "&#" combination. This specific combination is required since we are using Norwegian characters.

And I have set httpRuntime requestValidationMode="2.0" in web.config as well.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Ok, from the comments, I make it also as an answer.

Place the ValidateRequest="false" on the web.config to prevent the case that its hit on a forgotten page with out this declaration.

<pages validateRequest="false" ... >

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...