I have a service stack application. The testing service receives a simple request, but I find that the value of the received request does not match the original request.
I am sending: http://localhost/testapp/test?value=%22test%20data%22%20%3C12345%3E
but code outputs: test data "12345>
Note the missing first double quotation mark and the missing bracket for the corners of the left hand.
Any ideas why the application will discard the first "and" <"? Is this part of any XSS protection?
My code is:
public class TestService : RestServiceBase<RequestDto>, IRestService<RequestDto> { public override object OnGet(RequestDto request) { return request.Value; } } public class RequestDto { public string Value { get; set; } }
To allow the service stack to first receive requests with "<". I had to switch web.config applications to use: requestValidationMode = "2.0"
Rtype source share