Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Integrating Security with Windows Active Directory
Message
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
00955014
Message ID:
00955141
Vues:
26
This message has been marked as the solution to the initial question of the thread.
>We had a prospect ask an interesting question today, "Can your software integrate with the Windows Active Directory so the users do not have to login to your application?". They are trying to avoid having their users login into to each application seperately and just have them login to the network once. They want user applications to then figure out who they are and set the appropriate security.
>
>I did a search of the UT archive and I see that you can programatically create user record in mmSecurity. My question is, can you supress the login form and just read the user from the Windows Active Directory to establish their security settings? Any help is appreciated.

Yes...You can get the current user's name like this:
string Name = System.Security.Principal.WindowsIdentity.GetCurrent().Name;
You could then use this information to read the user's record in your database and retrieve the user PK (you can subclass the mmUser class and add a GetUserByID(), for example).

You can suppress the login form which is launched in your Main.cs file and simply call the Security Manager directly, like this:
mmAppBase.SecurityMgr.RegisterUser(<user PK>);
Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform