You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm calling the render method overload which accepts a statuscode and an object, and I want to return a 401 with an error object from the ControllerBeforeAction of my base controller.
When doing it with an executable VCL forms app, it works as expected.
When using the same code in an ISAPI dll, published in IIS, the status code is always 200.
I fixed it by using Render(object) and then calling Context.Response.StatusCode := 401
Note that in the log file, the correct status code was displayed for the response, so at first we thought that the problem was with IIS.
The text was updated successfully, but these errors were encountered:
I am having the exact same issue when deploying an ISAPI dll to IIS.
Calling Context.Response.StatusCode := 401 after calling Render doesn't seem to fix the issue for me.
If I just call Context.Response.StatusCode := HTTP_STATUS.BadRequest; and comment out Render() the status code is as correct. (201 instead of 200)
I am using the latest release of DMVC (DelphiMVCFramework 3.2.0-boron).
I confirm this issue, Render(422, 'string') is OK (response code 422) but Render(422, TObject) is not OK (response code 200). It works well when running our server in console.
I'm testing on master.
I'm using version 3.1 lithium.
I'm calling the render method overload which accepts a statuscode and an object, and I want to return a 401 with an error object from the ControllerBeforeAction of my base controller.
When doing it with an executable VCL forms app, it works as expected.
When using the same code in an ISAPI dll, published in IIS, the status code is always 200.
I fixed it by using Render(object) and then calling Context.Response.StatusCode := 401
Note that in the log file, the correct status code was displayed for the response, so at first we thought that the problem was with IIS.
The text was updated successfully, but these errors were encountered: