Atozed Forums

Full Version: AddRootHandler doesn't work in IW 16.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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);