Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Set Response 403 from TContentForm.OnBeforeExecute
#5
(07-31-2024, 07:14 AM)Alexandre Machado Wrote:
(07-17-2024, 10:11 PM)Mario Villalba Wrote: Hello Alexandre.
You could modify the response code in the "IWServerControllerBaseExecuteRequest" event. When processing the request, if any exception is given, I need to return code 500. By directly assigning Response.Code := 500; It gives me the error 'Reply type already set.'.[/font][/size]

Hi Mario,

I'm not sure if I follow.

Are you trapping the exception and directly assigning Response.Code := 500 or letting the exeption flow?

Hello Alexandre.
I was able to solve it now. When catching the exception I was directly assigning "Response.Code := 500;" without first resetting the response "Response.ResetReplyType;"
Thank you so much
Reply


Messages In This Thread
RE: Set Response 403 from TContentForm.OnBeforeExecute - by Mario Villalba - 07-31-2024, 01:35 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)