13
Views
3
Comments
Infinite loop in concurrent login in multiple places
Question

Hello All,


Recently I was doing checking for multiple active user session in the system. But I ran into infinite loop when I login and also logout. Can anyone suggest any idea to resolve it?? Attached is the oml.


Thanks :)

DetailScreen.oml

mvp_badge
MVP
Rank: #39

Hi,

I can't publish your module to confirm this because of missing references, but these sorts of loops are usually caused by page permissions chaining you into inaccessible pages. Here's my theory:

 - the default entry point for your application is the Movies page (Entry1 connects to it);

 - your Movies page demands you have the AAdmin permission in order to access it:

 - the login page preparation checks to see if you are logged in: it's possible to be logged in but not an AAdmin:

If you're logged in, the ExternalURL sends you to the home screen of your application which is Movies. If you don't have permissions, this triggers an Exception and sends you back to the Login screen, and the cycle repeats.

You can try setting up debug breakpoints around these parts of your module to confirm this. The Login screen preparation, the Movies screen preparation, and the OnException handler are good candidates and possibly all involved with this.

mvp_badge
MVP
Rank: #39

I'm looking at the OnBeginWebRequest and there are some branches that cause you to logout. It could certainly be related.

This is all just theory though. Have you tried debugging before you trigger one of these infinite loops? You'd be able to follow the code execution step-by-step so it should prove helpful in figuring out what's going wrong.