Q:

A potentially dangerous Request.Form value was detected from the client in local server

I am getting this error when I click on ASP Button. Error: A potentially dangerous Request.Form value was detected from the client
I have read few question of stack over flow. The point here is the button is working fine when I live the website to our client server. But it is not working if I configure in my local IIS server.
Do I need to change any settings in my local IIS server?
Please suggest.

A:

By default, the application is prevented from processing unencoded HTML content submitted to the server.
If you set the the RequestValidationMode to 2.0 in your web.config, it will solve your issue.
<system.web>
  <httpRuntime requestValidationMode="2.0" />
</system.web>

If you want to make the smallest change possible, you could define the requestValidationMode inside a location element to have it applied to a specific page (ex: Login page)
<location path="Login.aspx">
    <system.web>
        <httpRuntime requestValidationMode="2.0" />
    </system.web>
</location>

Remarks (From MSDN)
The RequestValidationMode property specifies which ASP.NET approach to validation will be used. This can be the algorithm that is used in versions of ASP.NET earlier than version 4, or the version that is used in .NET Framework 4. The property can be set to the following values:

4.5 (the default). In this mode, values are lazily loaded, that is, they are not read until they are requested.
4.0 The HttpRequest object internally sets a flag that indicates that request validation should be triggered whenever any HTTP request data is accessed. This guarantees that the request validation is triggered before data such as cookies and URLs are accessed during the request. The request validation settings of the element (if any) in the configuration file or of the directive in an individual page are ignored.
2.0. Request validation is enabled only for pages, not for all HTTP requests. In addition, the request validation settings of the element (if any) in the configuration file or of the directive in an individual page are used to determine which page requests to validate.

