CSLA .NET

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
  • Server-side Data Portal hooks

    rated by 0 users
    Answered (Verified) This post has 1 verified answer | 3 Replies | 1 Follower

    Top 25 Contributor
    204 Posts
    Jaans posted on Wed, Nov 30 2011 11:47 PM

    Hi All

    Is there some way I could hook an event / override to the server side of the data portal to allow me to validate some information about the request?

    For example I might need to get a custom session property off of the ApplicationContext.User to slide / expire the session. There are some other useful trace / audit logging options I can think of here.

    Thanks,
    Jaans

    Answered (Verified) Verified Answer

    Top 10 Contributor
    2,279 Posts
    Verified by Jaans

    Hi Jaans,

    You can hook into the DataPortal using the CslaAuthorizationProvider in Web.Config.

    This will be the first call on the server for Authorizing the request (but you can do other stuff as well - f.ex logg the request).

    Unfortunately, there is no similar hook for when the DataPortal has finished serving the request in the standard DataPortalProxys.

    You can hook into the dataportal with custom exception handling (for transformation to serializable exception and/or exception logging) using the CslaDataPortalExceptionInspector setting. See Samples\Net\cs\CustomErrorHandling sample.

    You can, however, implement your own DataPortalProxy and any custom logging/trace etc that you want.

    Jonny Bekkum, Norway CslaContrib Coordinator

    All Replies

    Top 10 Contributor
    2,279 Posts
    Verified by Jaans

    Hi Jaans,

    You can hook into the DataPortal using the CslaAuthorizationProvider in Web.Config.

    This will be the first call on the server for Authorizing the request (but you can do other stuff as well - f.ex logg the request).

    Unfortunately, there is no similar hook for when the DataPortal has finished serving the request in the standard DataPortalProxys.

    You can hook into the dataportal with custom exception handling (for transformation to serializable exception and/or exception logging) using the CslaDataPortalExceptionInspector setting. See Samples\Net\cs\CustomErrorHandling sample.

    You can, however, implement your own DataPortalProxy and any custom logging/trace etc that you want.

    Jonny Bekkum, Norway CslaContrib Coordinator

    Top 25 Contributor
    204 Posts
    Jaans replied on Thu, Dec 1 2011 6:00 AM

    Thanks Johnny!

    I'll check out the CslaAuthorizationProvider and see if it fits my needs.

    Is it a CSLA 4 only thing or is it available in CSLA 3?

    Top 25 Contributor
    204 Posts
    Jaans replied on Thu, Dec 1 2011 9:15 AM

    FWIW - It's available in CSLA 3.8.4 also.

    Page 1 of 1 (4 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