DataPortalContext.Principal is null when Invoke is called on ObjectFactory

DataPortalContext.Principal is null when Invoke is called on ObjectFactory

Old forum URL: forums.lhotka.net/forums/t/9987.aspx


Killian35 posted on Wednesday, January 26, 2011

Hello,

I'm using Silverlight 4.0 application with CSLA 4.1.

I have an "Invoke" method defined on an object factory that exists on the server. The method accepts a DataPortalContext object.

During a DataPortal call from the client the DataPortalContext.Principal (and all others) property is null, however, the ApplicationContext.User is fine. The principal is being transfered back to the server. I can access it during the "Invoke" method call using ApplicationContext, but the DataPortalContext.Principal is null.

Is there something I'm missing?

Thanks,

Kelly

RockfordLhotka replied on Wednesday, January 26, 2011

What type of authentication are you using in the application? There are several configuration options for the data portal that control whether the client-side User property flows to the server on each data portal call, depending on the type of authentication being used.

Killian35 replied on Wednesday, January 26, 2011

The authentication type isn't touched, so "Csla". The ApplicationContext information flows from the client to the server as I can access the client context and user directly in the Invoke method just fine. The DataPortalContext doesn't have the culture names set and drilling down using the debugger showed that not even the global and client contexts are set. 

I tested the same thing on the SimpeNTier example running the WcfHost for the Silverlight part. I added an Invoke method to the OrderFactory with a DataPortalContext parameter and the same result. 

Kelly

 

Copyright (c) Marimer LLC