Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5929243
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T14:23:47+00:00 2026-05-22T14:23:47+00:00

I understand why the exception A potentially dangerous Request.Form value… occurs and why it’s

  • 0

I understand why the exception ” “A potentially dangerous Request.Form value…” occurs and why it’s useful. I would like to put client-side validators on my page that check if the input contains < > ON= or whatever else may trigger this exception. The problem is, I don’t know all the characters or strings that trigger the exception. Is there a list of the triggers some where? I can’t seem to find it, only questions/answers relating to the exception itself and how to handle it.

Also, should a request come from an external source, not my form, how can I tell and how can I handle it? Does Asp.NET do this automatically? Would a hidden field work or can hackers get around that?

An information you can give (including links) is appreciated.

UPDATE:

For anyone interested, I came up with a regex that will match any string with these characters.

(^((?=.*&#).*)$)|(^((?=.*<).*)$)|(^((?=.*>).*)$)

However, when you submit a form, even fields that are in a separate validation group than the button clicked are passed to the server and if any invalid text is in those fields, you get the exception. So, I decided to use an Ajax FilteredTextBoxExtender to block those chars from TextBoxes. Another alternative would be to use a JavaScript keyup function on all the TextBoxes. However, the smart user can disable the JavaScript of both of these and they are not completely reliable.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T14:23:48+00:00Added an answer on May 22, 2026 at 2:23 pm

    Looks like this is a duplicate of a similar question on this site. This question has several answers where people have reflected through the code to get the actual triggers.

    In answer to your other question, if invalid input comes in from a request originating somewhere that you don’t explicitly validate, for example another site, it will hit ValidateRequest on the server side of your code and the caller will see a 500 error or your custom error page, if enabled. That’s assuming that you allow requests from other servers (read about CSRF). If you don’t want to allow requests from other servers you can check the referer of the request and only allow requests from your own site.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The following line of code throws an Exception: HttpResponse response = client.execute(request); // actual
From what I understand throw causes an exception. It looks like it can be
I understand it doesn't throw an Exception and because of that it might be
So now I understand that I'm getting a ARM Data Abort exception - I
From what I understand of the SDK, this exception is raised when the bindings
I do not seem to understand how to catch constructor exception. Here is relevant
I can fix the below exception with a try-catch loop but I cannot understand
Why only one overload throws this exception? Little update: I understand that there was
I'm trying to better understand exception handling and logging in a j2ee environment to
Can't really understand what's going wrong here? It's just a simple exception with an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.