The mentioned exception is happening because in
ASP.NET 4, the request validation is now being called for every asp.net
resource like web services and other httphandlers.As a result, you may
get that exception even if you turned off the RequestValidation via:
<pages validateRequest="false" .... section.
This is one of the breaking changes that were mentioned here.
So the solution is to set the new HttpRuntime "RequestValidationMode" property to "2.0" and it should take care of that exception.
<httpRuntime requestValidationMode="2.0" />


