Which client platform and CSLA version are you using?
Do you use the standard System.ComponentModel.BackgroundWorker in your application?
If you are then switch to use Csla.Threading.BackgroundWorker.
The most likely cause is that you are on another thread:
public static IPrincipal User
{
get
{
IPrincipal current;
if (HttpContext.Current != null)
current = HttpContext.Current.User;
else if (System.Windows.Application.Current != null)
{
if (_principal == null)
{
if (ApplicationContext.AuthenticationType != "Windows")
_principal = new Csla.Security.UnauthenticatedPrincipal();
else
_principal = new WindowsPrincipal(WindowsIdentity.GetCurrent());
}
current = _principal;
}
else
current = Thread.CurrentPrincipal;
return current;
}
Copyright (c) Marimer LLC