Pretty sure this is an IIS configuration-issue since it works in our local dev AND test environment, but not in production. Haven't been able to find the configuration issue though, hence this question.
This is the service method in question
[WebInvoke(UriTemplate = "GetSpecificData/{type}/{id}/{categories}", Method = "POST", ResponseFormat = WebMessageFormat.Json)]
[OperationContract]
string GetSpecificData(string id, string type, string categories);
We are calling it with this url for example:
/Services/MapService.svc/GetSpecificData/Office/18.029788,59.332478/0
In production it immediatly results in a http status 400 and "Bad request" from server. Locally and in our test environment it works just fine.
We think the problem is related to the ID-part. if we change it to practically anything else, however small the difference, it seems to work. Here are some examples
Does not work: 18.029788,59.332478
WORKS
- 19.029788,59.332478 works
- 28.029788,59.332478 works
- 18.129788,59.332478 works
- 18.029788,59.432478 works
- 18.029788,59.asdfasd332478
- 18.asdf029788,59.332478
Does not work: 16.163657,60.146846
WORKS
- 16.263657,60.146846
- 16.363657,60.146846
- 16.463657,60.146846
- 16.563657,60.146846
- 16.663657,60.146846
- 16.163657,60.246846
- 16.363657adsfasdfasdfasdf,60.146846asdfasdfasdfa
In our search for answers and narrowing things down these are a few things we've concluded
- HTTP or HTTPS doesn't matter
- No ISA or FW is causing it
- weird characters in url (like the comma, or dot..) is not the issue
- the length of the request is not the issue, it can be waaay longer (260 chars)
Please oh please, hope someone has ideas on what this can be. It drives me crazy not figuring it out. Apparently there's ways to solve the problem by rewriting the service to take query params or simliar but I really want to understand what causes this problem