G
Guest
I have some Java code that I need to mimic to have my ASP/C# web application
(C# being the middle-tier) authenticate to a mainframe (running AIX) using
LDAP. The Java code looks something like this:
private UserLogonInfo authenticate(
String ldapUrl,
String userId,
String password)
throws LogonException {
Hashtable env = new Hashtable();
env.put(
Context.INITIAL_CONTEXT_FACTORY,
"com.sun.jndi.ldap.LdapCtxFactory");
env.put(Context.PROVIDER_URL, ldapUrl);
env.put(Context.SECURITY_AUTHENTICATION, "simple");
env.put(Context.SECURITY_PRINCIPAL, sb.toString());
env.put(Context.SECURITY_CREDENTIALS, password.toUpperCase());
// Create the initial context
try {
DirContext ctx = new InitialDirContext(env);
-------
All the examples of C# LDAP authentication I can find are using ADSI to
Active Directory. Does anyone know what classes I could use with C# to make
this work?
Thanks,
DavidR
(C# being the middle-tier) authenticate to a mainframe (running AIX) using
LDAP. The Java code looks something like this:
private UserLogonInfo authenticate(
String ldapUrl,
String userId,
String password)
throws LogonException {
Hashtable env = new Hashtable();
env.put(
Context.INITIAL_CONTEXT_FACTORY,
"com.sun.jndi.ldap.LdapCtxFactory");
env.put(Context.PROVIDER_URL, ldapUrl);
env.put(Context.SECURITY_AUTHENTICATION, "simple");
env.put(Context.SECURITY_PRINCIPAL, sb.toString());
env.put(Context.SECURITY_CREDENTIALS, password.toUpperCase());
// Create the initial context
try {
DirContext ctx = new InitialDirContext(env);
-------
All the examples of C# LDAP authentication I can find are using ADSI to
Active Directory. Does anyone know what classes I could use with C# to make
this work?
Thanks,
DavidR