Bug Report on ASP Validate data

OS info

  • Operating System : Windows 10.0.18363
  • Wappler Version : 2.4.2

Problem description

I am using Classic ASP to validate an inserted data using the Validator.

I get the following error in the browser console:

  1. HTTP400: BAD REQUEST - The request could not be processed by the server due to invalid syntax. (XHR)POST - http://[[myurl]

  2. 400 error, no form errors in response. Bad Request

Steps to reproduce

  1. Server Connect > Add Validate data > Does not exist in database
  2. Run in browser
  3. Error

Hello,
What expression are you using for this? Are you checking a POST variable?

It is a POST variable. If I disable the validation the record is inserted.

Ok, we are going to check this.

Does it work correctly when that specific step was removed? 400 error means that the validation failed, what is the exact response from the server?

This is the exact message:

in the network tab of devtools, the exact response from the server.

Please take a look…

could you show the response tab
image

As I typed earlier… Bad Request

Does it only happen with the database validation or with any server side validation?

I haven’t tried other validation options. Just the database validation

Just one other question. Was the request indeed invalid, should it return as invalid or did it show the error on a valid request? What I want to know is if it returns the bad request for any request or that the validator is just not returning the correct response body.

I believe it is just not returning the correct response body as you said. When there’s no duplicates the insert step gets executed otherwise if there’s a duplication it just throws that error Bad Request

It seems that probably IIS is causing the problem, it overwrites the error responses. Not sure which setting is needed in your case, but check following articles:


https://forums.iis.net/t/1238952.aspx?Returning+messages+along+with+error+code

My IIS is version 10 and i have detailed output settings enabled. I’ve seen that article before and it doesn’t apply to my situation.

well the error you are seeing is the IIS standard error - so it is overridden and you have to disable that to see the real status/error send from server connect. That is the reference to the article above of how to do it.