Web forum is in read-only mode. Login as active registered customer for write access
  Forum Search   New Posts New Posts

Access Violation on TTIWPayPalClient

 Post Reply Post Reply
Author
Lira Joao View Drop Down
Member
Member
Avatar

Joined: 12 Jan 2017
Posts: 56
Post Options Post Options   Quote Lira Joao Quote  Post ReplyReply Direct Link To This Post Topic: Access Violation on TTIWPayPalClient
    Posted: 12 Nov 2017 at 9:04pm
Hello,


    I'm facing a problem with 'TTIWPayPalClient' after the completion of the transaction, on 'PayPalPaymentOk' event. The transaction runs ok, but in my application, I need to do some processing after a successful transaction. In this event, I have to set some components with data from the current user session and that are in the 'UserSession' datamodule. But, after the PayPal transaction, when I try accessing a component of UserSession datamodule, I receive an 'EAccessViolation Error', probably because your  'PayPal' component is changing the 'UserSession' ID or something like that.

   I did the same thing using your 'PalClientDemo' application and the problem was the same, so the problem is in the 'PayPal' component. So, if you want to reproduce the error, just put a component in your 'UserSession' and try to access it in the 'PayPalPaymentOk' event, for example.
   
   How to fix that?

   Thank you.

   Joao Lira.
Back to Top
Bart Holvoet View Drop Down
TMS Support
TMS Support
Avatar

Joined: 18 May 2010
Posts: 2089
Post Options Post Options   Quote Bart Holvoet Quote  Post ReplyReply Direct Link To This Post Posted: 13 Nov 2017 at 10:20am
Hi,

We are not aware of any issues with the TIWPayPalClient component.
Can you please provide the version of IntraWeb you are using so I can further investigate this?
Back to Top
Lira Joao View Drop Down
Member
Member
Avatar

Joined: 12 Jan 2017
Posts: 56
Post Options Post Options   Quote Lira Joao Quote  Post ReplyReply Direct Link To This Post Posted: 13 Nov 2017 at 10:28am
Hi Bart,

I am using the latest version of Intraweb, 14.2.4. Do what I told in my previous message on your own PayPal demo and you will be able to reproduce the problem:

1) Put a component in the 'UserSession' module of your demo;
2) Make a transaction on PayPal (sandbox) and on the "OnPayPalPaymentOk" event try to access the component that you put on 'UserSession' module. This will raise the exception, probably because the session ID became invalid for a reason that I don't know. It is simple to reproduce this.

 Thanks.

Joao Lira
Back to Top
Bart Holvoet View Drop Down
TMS Support
TMS Support
Avatar

Joined: 18 May 2010
Posts: 2089
Post Options Post Options   Quote Bart Holvoet Quote  Post ReplyReply Direct Link To This Post Posted: 13 Nov 2017 at 11:18am
Can you please try setting the AllowMultipleSessionsPerUser in the IWServerController to true?
Back to Top
Lira Joao View Drop Down
Member
Member
Avatar

Joined: 12 Jan 2017
Posts: 56
Post Options Post Options   Quote Lira Joao Quote  Post ReplyReply Direct Link To This Post Posted: 14 Nov 2017 at 4:30am
Hi Bart,

Originally posted by Bart Holvoet

Can you please try setting the AllowMultipleSessionsPerUser in the IWServerController to true?

  The same result with your suggestion. Have you checked your own sample with some component added to the 'UserSession' data module? This is a serious problem that makes the component unusable. Could you, please, check this problem or point up a solution?

   Thank you.


    Joao Lira.


Back to Top
Lira Joao View Drop Down
Member
Member
Avatar

Joined: 12 Jan 2017
Posts: 56
Post Options Post Options   Quote Lira Joao Quote  Post ReplyReply Direct Link To This Post Posted: 14 Nov 2017 at 11:54pm
Hi,

Could this be an Intraweb bug?

I am doing some checks before and after the 'PayOnline' procedure to see when the session ID changes. Looks like it happens after the call to 'WebApplication.GoToURL'. Can this problem be caused by Intraweb itself? Have you already checked this?

Regards,

Joao Lira
Back to Top
Bart Holvoet View Drop Down
TMS Support
TMS Support
Avatar

Joined: 18 May 2010
Posts: 2089
Post Options Post Options   Quote Bart Holvoet Quote  Post ReplyReply Direct Link To This Post Posted: 15 Nov 2017 at 8:45am
Hi,

I haven't been able to allocate sufficient time to further investigate this.
Can you reproduce this in a sample project that only uses default IntraWeb controls?
If so, this is most likely an IntraWeb framework issue. Please contact Atozed Software for further assitance.
Back to Top
Lira Joao View Drop Down
Member
Member
Avatar

Joined: 12 Jan 2017
Posts: 56
Post Options Post Options   Quote Lira Joao Quote  Post ReplyReply Direct Link To This Post Posted: 16 Nov 2017 at 3:23am
Hello,

   I tried to reproduce the problem with default Intraweb controls but it didn't fail on the 'WebApplication.GoToURL' call, so my suspicion was wrong. 

   Do you want I send you the PayPalDemo with the component error problem on 'UserSession' so you can check it easier?

   Joao Lira.
Back to Top
Bart Holvoet View Drop Down
TMS Support
TMS Support
Avatar

Joined: 18 May 2010
Posts: 2089
Post Options Post Options   Quote Bart Holvoet Quote  Post ReplyReply Direct Link To This Post Posted: 16 Nov 2017 at 8:36am
Yes, please provide a ready to run sample project that demonstrates the problem so I can further investigate this.
You can mail it as attachment to mailto:help@tmssoftware.com
Back to Top
Lira Joao View Drop Down
Member
Member
Avatar

Joined: 12 Jan 2017
Posts: 56
Post Options Post Options   Quote Lira Joao Quote  Post ReplyReply Direct Link To This Post Posted: 16 Nov 2017 at 10:35am
Hello Bart,

  e-mail sent!

  Thank you.

  Joao Lira
Back to Top
Iderman Can View Drop Down
New Member
New Member
Avatar

Joined: 09 Feb 2016
Posts: 6
Post Options Post Options   Quote Iderman Can Quote  Post ReplyReply Direct Link To This Post Posted: 27 Jan 2018 at 9:18pm
How did you solve this. I find the same error. It appears that UserSession is not defined after the events are triggered. 

Thank you
Back to Top
Iderman Can View Drop Down
New Member
New Member
Avatar

Joined: 09 Feb 2016
Posts: 6
Post Options Post Options   Quote Iderman Can Quote  Post ReplyReply Direct Link To This Post Posted: 27 Jan 2018 at 9:41pm
Ok I was able to find a workaround. It seems that only the UserSession function doesn't work during the event trigger. The session however is still there. So the solution is to temporarily save a pointer to the TIWUserSession and use this pointer when accessing the contents of the session variable during the trigger.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down