N
nborshukov
Guest
If you "link" windows user to database user, you can use the following code to verify windows user and password: USING System.DirectoryServices.AccountManagement.*. DEFINE VARIABLE objContext AS class PrincipalContext no-undo. if true then /* for domain */ objContext = NEW PrincipalContext(ContextTypeomain,"DomainName"). else /* for machine */ objContext = NEW PrincipalContext(ContextType:Machine). MESSAGE objContext:ValidateCredentials("WindowsUserName","WindowsPassword") VIEW-AS ALERT-BOX INFO. objContextispose(). delete object objContext. Add System.DirectoryServices.AccountManagement assembly to project assemblies in order to run code above.
Continue reading...
Continue reading...