If I successfully run a VS.NET app which includes the following;
************************** APP 1 ****************************
m_iIdnt = new
System.Security.Principal.GenericIdentity(t.UserNa me,"MyAuthentication");
//user and My authentication type added to Identity
string[] roles = {"Chief Cook and Bottle Washer", "Master Gardener"};
m_iPrincipal = new
System.Security.Principal.GenericPrincipal(m_iIdnt ,roles); //roles and
Identity added to Principal
System.Threading.Thread.CurrentPrincipal = m_iPrincipal; //Threads
current principal is set
************************************************** **************
and then create a new VS.NET app to retrieve the Principal and Identity off
the thread created in APP 1 above
*************************** APP 2 ****************************
AppDomain.CurrentDomain.SetPrincipalPolicy(Princip alPolicy.WindowsPrincipal)
;
IPrincipal currentPrincipal = Thread.CurrentPrincipal;
IIdentity currentIdentity = currentPrincipal.Identity;
string authtype = currentIdentity.AuthenticationType;
string iden = currentIdentity.Name;
************************************************** **************
I get NTLM as the authentication type.
I want to retrieve the thread that has "MyAuthentication" as the
authenticationtype.
Where am I at in the landscape here? Different app domains, different
threads, different principle?
Where I am trying to go is move from a role-based initiation of user/role
and then later using declarative security, grab the user/role from the
"appropriate runtime thread" (where my understanding falls apart) to compare
with a database or config file user/role.
Thank you for helping me with the context and any implementation details.
-Greg