I have a .NET 4 WCF service running as an IIS website with ASP.NET compatibility mode. Once of the service methods accepts a string parameter and when there is a value which contains a '&' the ASP.NET pipeline raises a validation exception. I've assigned the following config settings:
<system.web>
<httpRuntime requestValidationMode="2.0"/>
<pages validateRequest="false"/>
</system.web>
And the error persists. The error occurs regardless of whether the input is encoded. I found a potential solution here which suggests providing a custom implementation of System.Web.Util.RequestValidator, however I was wondering whether there are alternatives that can be done with configuration settings only.
EDIT: I've also found this, however the proposed solution does not fix the problem.