OnSessionStart -> How to avoid it

OnSessionStart -> How to avoid it

Hi everyone,

I'm currently trying to add a functionality of printing several screens.

I have this one iframe inserted in a list records widget. Inside a Screen, for example, TestScreen, i have the list records and the iframe for the IFRAMEScreen.

The problem is that the iframe runs the onsessionstart, and instead of IFRAMEScreen I get my LoginScreen .....

OnsessionStart doesn't have any input parameters so i can't control it with input variable in iframe....

I just want a full data report of my screens, without rebuilding them....

Anyone may help?

(My intention is to print a lot of screens with a single click....)

Best regards,

Diogo C S Cordeiro
The pages you are trying to see probably need authentication.
If you are authenticated, then those pages should not redirect to the login screen...

Is this the case, or am I missing something?
Tiago Simões
The pages have an authentication system based on http username...Which fails there....What i would like would be to jump over this authentication mechanism testing some variable...The problem is it is not possible to input into onsessionstart, which is the first action that runs....
Hi Diogo,

Does the iframe content comes from another eSpace (not the eSpace containing the iframes)? In that case, it's normal that the OnSessionStart event is triggered on the 1st acess.

But if you are using the same eSpace, check if this scenario applies:

- you are testing your main page using your PTA in the URL (ex: http://server/eSpace/diogo/);
- and the iframe URL does not include your PTA (ex: http://server/eSpace/).

In this case, remember that you are accessing 2 different applications (PTA and Publish Area). OnSessionStart can be triggered due to this reason although it would appear that you already had an existing session.

Hi Diogo,

I'd just like to add something to what Paulo said. In case both screens are in the same eSpace, you can also be loosing your session due to the fact that you are maintaing you session identifier in the URL (instead of using cookies). To see if that is the case, check if in the "Advanced" tab of the eSpace properties if you have "Use Cookies" unchecked. If in fact that is the case and you want to continue using the session identifier in the URL, you must add the session identifier to your IFRAME's src URLs (you can use the AddSessionToURL action of the HTTPRequestHandler Outsystems Solution for that).

In case the screens are in different eSpaces, it is a normal that the OnSessionStart action is executed and in that case you'll have to deal with the Authentication. Can you explain more thouroughly what you mean by "http username". Are you talking about Basic HTTP Authentication?

Best Regards,

Daniel Lourenço
Thank you all for your feedback.

Daniel, you hit the flaw, thank you for that.
I hadn't cookies enabled, and wasn't passing my session Id.

Now a lot of boring hard work will be surpassed.

Best Regards,

Diogo C S Cordeiro