Reputation: 11
We are experiencing a very annoying issue with Web API 2.0 (.NET). We have a PUT method that takes a JSON string parameter which has to be passed through the request body. It all works fine with short strings, although when we pass a longer parameter with more characters, it gets truncated and our method can't obviously parse it.
Are you aware of any string length limit in the API request body? I'm not even sure if it's an application problem, or just some settings in the IIS. If someone here could point me to the right direction that'd be much appreciated.
Upvotes: 0
Views: 1828
Reputation: 11
Ok. I found out that this problem shows up only with [FromBody] parameters. My PUT method accepts a string as a [FromBody] parameter and gets truncated, whereas when I use objects/classes as input params, they work absolutely fine
Upvotes: 1