I'm following the example of implementing the IAuthorizeDataPortal.
What I'm finding is that when a BusinessList object's Fetch method is called, the Authorize method gets triggered twice before the Fetch method is executed. Actually, it gets called 4 times, in pairs of two.
For the first pair, LocalContext["FirstRun"] is null, so my login routine is executed properly. The Authorize method is then triggered again, but the FirstRun value is already set to False, so the login routine gets bypassed correctly. However, that same series gets executed a second time...and the LocalContext["FirstRun"] is back to null again, which means the login routine runs unnecessarily.
The main thing is, this happens for a single call to a list's Fetch method. I would understand if I made multiple calls from the client, but only one call is being made. What am I missing? Is perhaps the child object of the list parent also triggering the call to Authorize? Or perhaps my Criteria object? Even if that was the case, however, I would have guessed that would all be executing under one thread, and thus LocalContext["FirstRun"] would show always show False.
Copyright (c) Marimer LLC