[progress Communities] [progress Openedge Abl] Forum Post: Re: Looking For An Example Of...

Status
Not open for further replies.
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(ContextType:Domain,"DomainName"). else /* for machine */ objContext = NEW PrincipalContext(ContextType:Machine). MESSAGE objContext:ValidateCredentials("WindowsUserName","WindowsPassword") VIEW-AS ALERT-BOX INFO. objContext:Dispose(). delete object objContext. Add System.DirectoryServices.AccountManagement assembly to project assemblies in order to run code above.

Continue reading...
 
Status
Not open for further replies.
Top