Information générale
Catégorie:
The Mere Mortals .NET Framework
Titre:
SecurityMgr.RegisterUser question w win integration
Versions des environnements
Network:
Windows 2003 Server
Hi Kevin,
I'm attempting to integrate windows security with mm as per help file. Seems to work okay for gaining access (ie if computer\username not added to userlist it won't let me in), however later in the app I'm unable to obtain current user info using mmAppBase.UserMgr.UserID etc.
This works when I use the logon screen, just not the integration as per the code below, which was copied from the help file instructions. The DataRow does get populated with the correct userid and passed into RegisterUser.
Have I missed a step somewhere?
Suggestions?
thanks,
-Larry
-----
(from main.cs)
String Name = System.Security.Principal.WindowsIdentity.GetCurrent().Name;
// Get a reference to the User object
OakLeaf.MM.Main.Security.mmUser oUser = mmAppBase.SecurityMgr.oUser;
// Try to get the user record
oUser.GetUserByIdAndPassword(Name, null);
if (oUser.DataRow != null)
{
// Register the user with the application security manager
mmAppBase.SecurityMgr.RegisterUser(oUser.DataRow[oUser.PrimaryKey]);
result = DialogResult.OK;
}
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement