I already encountered this error, and it was caused by passing a property of a JSON object that is not in the data model.
For example, given a data model:
public class User
{
public long UserId { get; set; }
public string UserName { get; set; }
}
And the OData controller has a method:
public IHttpActionResult Post(User user)
When the following data is sent using the method POST:
{
"UserId": "0",
"UserName": "test",
"UserPassword": "test"
}
Then the server will return error 400 with the following response:
{
"error": {
"code": "",
"message": "The request is invalid.",
"innererror": {
"message": "user : Does not support untyped value in non-open type.\r\n",
"type": "",
"stacktrace": ""
}
}
}
, UserPassword , POST, .