Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Set Response 403 from TContentForm.OnBeforeExecute
#3
(09-16-2023, 09:14 PM)Alexandre Machado Wrote: Hola Jeroen,

pude recrearlo aquí. Es un uso interesante del método OnBeforeExeucte del controlador de contenido. Requirió una corrección simple en la lógica de los controladores de contenido que estará disponible en la próxima versión.

Por cierto, no necesitas configurar explícitamente el mensaje de finalización, ya que IW devolverá 403 - Prohibido, de manera predeterminada una vez que configures el HttpCode, a menos que quieras algo diferente.

Saludos

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.'.
Reply


Messages In This Thread
RE: Set Response 403 from TContentForm.OnBeforeExecute - by Mario Villalba - 07-17-2024, 10:11 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)