Atozed Forums
AddRootHandler doesn't work in IW 16. - Printable Version

+- Atozed Forums (https://www.atozed.com/forums)
+-- Forum: Atozed Software (https://www.atozed.com/forums/forum-1.html)
+--- Forum: IntraWeb (https://www.atozed.com/forums/forum-3.html)
+---- Forum: English (https://www.atozed.com/forums/forum-16.html)
+----- Forum: IntraWeb General Discussion (https://www.atozed.com/forums/forum-4.html)
+----- Thread: AddRootHandler doesn't work in IW 16. (/thread-5200.html)



AddRootHandler doesn't work in IW 16. - freshslo - 05-15-2025

Hello,

Why in IW16 doesn't work any more AddRootHandler??? It just closes the application when reach to this point.


procedure TIWServerController.IWServerControllerBaseConfig(Sender: TObject);
var FormHandler: TContentForm;
begin
  Self.RewriteURL := '/';

  TIWMimeTypes.RegisterType('.html', MIME_HTML, True);

  RegisterContentType('application/json');

  FormHandler := TContentForm.Create(TIWMainform);
  FormHandler.CanStartSession := true;
  FormHandler.RequiresSessionStart := true;
  THandlers.AddRootHandler('', '/', FormHandler);

  FormHandler := TContentForm.Create(TIWCheckout);
  FormHandler.CanStartSession := false;
  FormHandler.RequiresSessionStart := false;
  THandlers.Add('', '/checkout', FormHandler);