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

Ao reconfigurar o pool de uma aplicação C# Web da versão 2.0 para a versão 4.0 um erro de execução começou a ocorrer com algumas das páginas web da solução :

A potentially dangerous Request.Form value was detected from the client (GXState="...scricao":"<p>\n\tIsto é um tes...").

Description: Request Validation has detected a potentially dangerous client input value, and processing of the request has been aborted. This value may indicate an attempt to compromise the security of your application, such as a cross-site scripting attack. To allow pages to override application request validation settings, set the requestValidationMode attribute in the httpRuntime configuration section to requestValidationMode="2.0". Example: <httpRuntime requestValidationMode="2.0" />. After setting this value, you can then disable request validation by setting validateRequest="false" in the Page directive or in the <pages> configuration section. However, it is strongly recommended that your application explicitly check all inputs in this case. For more information, see http://go.microsoft.com/fwlink/?LinkId=153133. 

Exception Details: System.Web.HttpRequestValidationException: A potentially dangerous Request.Form value was detected from the client (GXState="...scricao":"<p>\n\tIsto é um tes...").

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Uma forma de evitar o erro é configurando a aplicação web para que ela continue executando usando o esquema de validação de formulários da versão 2.0 da asp.net.

Isto pode ser feito configurando o arquivo web.config da e acrescentando as duas últimas linhas ao nó <system.web> ::

  <system.web>

        <httpRuntime requestValidationMode="2.0" />

        <pages validateRequest="false" />

Para maiores informações consulte este artigo da ASP.NET :

http://www.asp.net/whitepapers/request-validation