-
-
Notifications
You must be signed in to change notification settings - Fork 345
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Render(StatusCode, Object) returning wrong status code in ISAPI dll #406
Comments
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. I am using the latest release of DMVC (DelphiMVCFramework 3.2.0-boron). |
Edit. My version is also 3.2, I made a mistake while writing the original comment. |
I confirm this issue, |
Have you enabled PassThrough error handling in the IIS app ? IIRC thisis required in the web.config file where your app is hosted.
|
PassThrough is enabled here and it doesn't work. |
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: