Solution: Angular + Asp.Net Core Version: 13.1
Issue with the API
Issue: Everything worked fine before upgrade from Version 12.4 to Version 13.1.
If I run any endpoint that has an Object as any of its parameter, I get an error from the ASP.Net zero framework before it even gets to the end point.
I even tried it right from swagger, and it triggers the error before it gets to the endpoint. If all parameters are string or anything else, they all work fine. the Error is below:
the sample end point in the App service
public async Task<object> RunDefinedReportObjectAsync(string reportName, object selectedparameters, object paramtype = null)
Error MEssage
{
"result": null,
"targetUrl": null,
"success": false,
"error": {
"code": 0,
"message": "Your request is not valid!",
"details": "The following errors were detected during validation.\r\n - The input does not contain any JSON tokens. Expected the input to start with a valid JSON token, when isFinalBlock is true. Path: $ | LineNumber: 0 | BytePositionInLine: 0.\r\n",
"validationErrors": [
{
"message": "The input does not contain any JSON tokens. Expected the input to start with a valid JSON token, when isFinalBlock is true. Path: $ | LineNumber: 0 | BytePositionInLine: 0.",
"members": [
"$"
]
}
]
},
"unAuthorizedRequest": false,
"__abp": true
}
Swagger screen shot
1 Answer(s)
-
0
Hi,
I assume this happens becasue we are using System.Text.Json instead of Newtonsoft right now. I have created an issue, please follow https://github.com/aspnetzero/aspnet-zero-core/issues/5144