Hi, I'm using non-core ASP.NET Zero Version 5.6.0 (ASP.NET MVC 5 & AngularJs 1.x) and also published to Azure.
I kept on getting "Your request is invalid!" on DTO custom validation even though I've set the custom validation error message on it.
But I can see the custom validation error message on swagger.
No matter on local machine or Azure environment and I've set customErrors mode = "RemoteOnly"
.
Thanks. /Tommy
Hi maliming,
This is what I got:
{
"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 - Min and Max must be 0 or blank since Input Type is not Text or Number.\r\n",
"validationErrors":[
{
"message":"Min and Max must be 0 or blank since Input Type is not Text or Number.",
"members":null
}
]
},
"unAuthorizedRequest":false,
"__abp":true
}
What I wanted to show is:
Min and Max must be 0 or blank since Input Type is not Text or Number.
Instead of:
Your request is invalid!
Thanks. /Tommy
Hi maliming,
Is there any setting or configuration related to this?
Thanks. /Tommy
Hi maliming,
Where to set the breakpoint? DTO or the js file?
When I add in console.log(error);
to that function, it shows nothing when the error occurred.
Thanks. /Tommy
Hi maliming,
It's not hitting the breakpoint.
Thanks. /Tommy
Hi maliming,
With latest version or the same version as mine now?
Thanks. /Tommy
Hi maliming,
The problem is solved.
This is happening is because my colleague did some changes to the 400 status code error and he just remembered that he did changes to it.
Sorry and thank you helping me.
Thanks. /Tommy
Dear Support,
I would like to find out what's the proper way to clear ApplicationSettingCahce if AspNetZero application is running on mutiple IIS servers?
Thanks. /Tommy
Yes. That's correct.