I'm offering a simple test service, now a clients posts a payload which is considered dangerous so the httpRequestValidation failes.
I tried to deactivate the HTTPValidation like I do in MVC
<pages validateRequest="false">
but this doesnt help. is there something special I have to set for ServiceStack ?
Exception Details:
System.Web.HttpRequestValidationException occurred
HResult=-2147467259 Message=Ein möglicherweise gefährlicher Request.Form-Wert wurde vom Client (payload="... [email protected]...") entdeckt. Source=System.Web ErrorCode=-2147467259 WebEventCode=0 StackTrace: bei System.Web.HttpRequest.ValidateString(String value, String collectionKey, RequestValidationSource requestCollection)
InnerException:
Any hints ?
ServiceStack doesn't add any request validation itself so this is likely an ASP.NET validation restriction. See this answer for more details:
To disable Request validation, ensure that you have added both to Web.config:
<httpRuntime requestValidationMode="2.0"/>
<configuration>
<system.web>
<pages validateRequest="false" />
</system.web>
</configuration>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With