Vibrant discussion about CSLA .NET and using the framework to build great business applications.

Forum has moved

New location: CSLA .NET forum

CSLA .NET Resources:
  • CSLA .NET forum
  • CSLA .NET home page
  • IAuthorizeDataPortal - LocalContext value somehow gets reset

    rated by 0 users
    Not Answered This post has 0 verified answers | 0 Replies | 1 Follower

    Top 25 Contributor
    202 Posts
    Tim posted on Mon, Jun 16 2014 1:37 PM

    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.


    Page 1 of 1 (1 items) | RSS

    Copyright (c) 2006-2014 Marimer LLC. All rights reserved.
    Email admin@lhotka.net for support.
    Powered by Community Server (Non-Commercial Edition), by Telligent Systems