On your ServerController.OnConfig() event, please write this:
procedure TIWServerController.IWServerControllerBaseConfig(Sender: TObject);
begin
Self.Auther := IWAutherEvent1;
end;
Note: Replace IWAutherEvent1 with the name of the component you are using for authentication. It should work. We are investigating why it is not loading from DFM.
Not Work!
Otherwise, it opens a login window, but it reports an error in OnCheck!
Debug Output: TIWServerController.IWAutherEvent1Check ERROR EAccessViolation error raised, with message : Access violation at address 0151F424 in module 'QnGUI.exe'. Read of address 000000AC Process QnGUI.exe (7340)
07-16-2019, 11:32 AM (This post was last modified: 07-16-2019, 11:34 AM by Alexandre Machado.)
(07-16-2019, 07:24 AM)matija Wrote: Not Work!
Otherwise, it opens a login window, but it reports an error in OnCheck!
Debug Output: TIWServerController.IWAutherEvent1Check ERROR EAccessViolation error raised, with message : Access violation at address 0151F424 in module 'QnGUI.exe'. Read of address 000000AC Process QnGUI.exe (7340)
yes, it does work. You need to determine why you are receiving an AV there. Something in your event code is probably accessing some object which hasn't been initialized yet. Debug your event and find out why you are getting an AV. IW is correctly triggering the event but it has no control over user code.
07-16-2019, 11:47 AM (This post was last modified: 07-16-2019, 12:00 PM by matija.)
(07-16-2019, 11:32 AM)Alexandre Machado Wrote:
(07-16-2019, 07:24 AM)matija Wrote: Not Work!
Otherwise, it opens a login window, but it reports an error in OnCheck!
Debug Output: TIWServerController.IWAutherEvent1Check ERROR EAccessViolation error raised, with message : Access violation at address 0151F424 in module 'QnGUI.exe'. Read of address 000000AC Process QnGUI.exe (7340)
yes, it does work. You need to determine why you are receiving an AV there. Something in your event code is probably accessing some object which hasn't been initialized yet. Debug your event and find out why you are getting an AV. IW is correctly triggering the event but it has no control over user code.
Only this is in OnCheck: Result := TIWUserSession(WebApplication.Data).CheckUser(aUser, aPass); from sample
WebApplication.Data = nil! Why?
Previously it worked! Must by change only property in ServerController or UserSession?
In your ServerController:
- Cut all code in your OnNewSession event, including all comments and variables. Leave it only as:
procedure TIWServerController.IWServerControllerBaseNewSession(aSession: TIWApplication);
begin
end;
- Save the ServerController file again (the IDE should remove the empty OnNewSession event)
- Now, in Object Inspector, locate OnNewSession event and double click on it, creating a new empty event.
- Paste back the original code. The event should be linked again.
Rebuild your application and run it again. See if it fixes the issue
07-17-2019, 06:45 AM (This post was last modified: 07-17-2019, 07:58 AM by matija.)
(07-17-2019, 01:10 AM)Alexandre Machado Wrote: Can you please do a test for me?
In your ServerController:
- Cut all code in your OnNewSession event, including all comments and variables. Leave it only as:
procedure TIWServerController.IWServerControllerBaseNewSession(aSession: TIWApplication);
begin
end;
- Save the ServerController file again (the IDE should remove the empty OnNewSession event)
- Now, in Object Inspector, locate OnNewSession event and double click on it, creating a new empty event.
- Paste back the original code. The event should be linked again.
Rebuild your application and run it again. See if it fixes the issue
Still the same error!
Removed IWServerControllerBaseNewSession and again created.
procedure TIWServerController.IWServerControllerBaseNewSession(
aSession: TIWApplication);
begin
ASession.Data := TIWUserSession.Create(nil, ASession);
end;
Also tried as a new project with Result := TIWUserSession(WebApplication.Data).CheckUser(aUser, aPass); in TIWServerController.IWAutherEvent1Check
It is not officially released yet, but you can try it and see if it fixed your problem. Have in mind that I was only able to partially recreate the issue you are having, but after setting the Auther but after setting it in code, the problem doesn't work anymore.
It is not officially released yet, but you can try it and see if it fixed your problem. Have in mind that I was only able to partially recreate the issue you are having, but after setting the Auther but after setting it in code, the problem doesn't work anymore.
Install IW15.1.1!
Login window oppears now without Self.Auther -> OK
Reinstall my JEDI Code library and now is Webaplication<>nil in OnCheck! Not know why?
I noticed that no work property CSS style and Visible for Button in this version. My application has bootstrap HTML template!