Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
New version 15.1.0 is now available
#11
(07-15-2019, 10:09 AM)matija Wrote: I use in my ServerController property Auther component TIWAutherEvent. Now not work!

I use OnCheck for check my windows username? Not come in this event function.


https://github.com/Atozed/IntraWeb/tree/...entication

BTW what's your Delphi version?
Reply
#12
(07-16-2019, 03:16 AM)Alexandre Machado Wrote:
Quote:I use in my ServerController property Auther component TIWAutherEvent. Now not work!

I use OnCheck for check my windows username? Not come in this event function.


https://github.com/Atozed/IntraWeb/tree/...entication

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)
Reply
#13
(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.
Reply
#14
(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?
Reply
#15
I'll try to recreate the issue here and let you know ASAP.
Reply
#16
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
Reply
#17
(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


Attached Files Thumbnail(s)
   
Reply
#18
I have just updated the Authentication demo online.

https://github.com/Atozed/IntraWeb/tree/...entication

Find attached the source code. Can you please test it and see what you get?


Attached Files
.zip   Authentication.zip (Size: 58.11 KB / Downloads: 2)
Reply
#19
There is a new build which contains the fix for the original issue here: http://downloads.atozed.com/IntraWeb/IW15.1.1.exe

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.
Reply
#20
(07-17-2019, 10:18 AM)Alexandre Machado Wrote: There is a new build which contains the fix for the original issue here: http://downloads.atozed.com/IntraWeb/IW15.1.1.exe

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!

Thx
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)