Lost session variables

Lost session variables

  
Hello,

I would like some help to solve a session variables issue, please.

This is the scenario:
  • I have two eSpaces: One for authentication e other that is a bussiness application;
  • Both of them have the same «User provider» eSpace;
  • After a well succeeded authentication in the first one, the Login action is executed, passing the UserID. This procedure will fill the session variables «Session.UserId» and «Session.UserName», and then redirect the user to the second eSpace;
  • The first moment that the second eSpace is reached, the session variables are still filled, but after a page reload, they are lost...
Why are the session variables lost in this situation?

Thanks in advance,
Hugo Laibaças
(Direção-Geral do Orçamento)
Hugo Laibaças wrote:
Hello,

I would like some help to solve a session variables issue, please.

This is the scenario:
  • I have two eSpaces: One for authentication e other that is a bussiness application;
  • Both of them have the same «User provider» eSpace;
  • After a well succeeded authentication in the first one, the Login action is executed, passing the UserID. This procedure will fill the session variables «Session.UserId» and «Session.UserName», and then redirect the user to the second eSpace;
  • The first moment that the second eSpace is reached, the session variables are still filled, but after a page reload, they are lost...
Why are the session variables lost in this situation?

Thanks in advance,
Hugo Laibaças
(Direção-Geral do Orçamento)
 
Hi Hugo

Usually, session lost occurs when the a new session is started on a User Provider, or a Logout event occurs.

Make sure the second espace doesn't reference an action from a different User Provider. This can execute the OnSessionStart of another User Provider. Try placing some Audits on all User Providers OnSessionStart system action, to tack down if any new session is started.

Cheers

MIguel Simões João
Hi Miguel,

Thanks for your feedback.
You were right :-) There was something clearing the session. It was the default «Login_Info» o web block. After removing it (it was not necessary), the session was never lost again.

Once again, thanks for you help.

Cheers,
Hugo Laibaças
Hi!

I tried to follow the solution you have given above.But unfortunately , I am not able to map myself with your solution.
Kindly, help me out with some examples if you have or else you can mention the steps i should follow to discard this session lost problem.

Its a bit urgent.

Thanks
Anik
Anik,

Can you tell us your specific problem?

How it happens and when?