Help with CurrentPrincipal error.

Help with CurrentPrincipal error.

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


herbmanII posted on Sunday, February 18, 2007

I have been debugging this problem for four hours with no luck.

I have an ASP.NET 2.0 application using CSLA 1.x

I get this exception when calling DataPortal.Fetch (...)   from one of my business objects.

"Principal must be of type BusinessPrincipal, not System.Security.Principal.GenericPrincipal."

Basically I have a login.aspx where I call the BusinessPrincipal.Login method.

At this point the Thread.CurrentPrincipal is of type BusinessPrincipal.  It's only when I redirect the page and then call one of my business object static get methods that I get this error.

Why is the Thread.CurrentPrincipal not set correctly inside my business object?

Any ideas would be appreciated.

 

 

Copyright (c) Marimer LLC