LDAP集成与Internet应用程序的MVC应用程序。 [英] LDAP Integration with MVC application for internet application.

查看:78
本文介绍了LDAP集成与Internet应用程序的MVC应用程序。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我们得到了一些requiremetn来实现其他域应用程序的LDAP集成。



根据我的理解,我们可以通过以下示例代码实现LDAP。



Hi All,

We got some requiremetn to implement LDAP integration for other domain application.

As per my understanding we can implement the LDAP through below sample code.

try
                  {
                      String defaultNamingContext = string.Empty;
                      using (DirectoryEntry deRoot = new DirectoryEntry("LDAP://RootDSE"))
                      {
                          if (deRoot.Properties["defaultNamingContext"] != null)
                          {
                              defaultNamingContext =
                                     deRoot.Properties["defaultNamingContext"].Value.ToString();
                          }
                      }

                      DirectoryEntry entry = new DirectoryEntry("LDAP://" + defaultNamingContext, "jitendra.so@hXX.com", "XX@!@#$%^");
                      object nativeObject = entry.NativeObject;
                     bool authenticated = true;
                  }
                  catch(Exception ex)
                  {

                      String msg = ex.Message;

}





我的问题是: -



1)由于LDAP主要用于Intranet应用程序,我们对LDAP具有读取权限,在我的情况下,我不确定已部署的应用程序是否具有读取权限LDAP服务器。



有没有其他方法来验证用户而无需在他们的域/内联网中托管LDAP的应用程序,这是另一种方式在我的情况下实现LDAP以及客户端所需的输入是什么,如任何访问权限或权限?

推荐答案

%^);
object nativeObject = entry.NativeObject;
bool authenticated = true ;
}
catch (例外情况)
{

字符串 msg = ex.Message;
%^"); object nativeObject = entry.NativeObject; bool authenticated = true; } catch(Exception ex) { String msg = ex.Message;

}





我的问题是: -



1)由于LDAP主要用于Intranet应用程序,我们对LDAP具有读取权限,在我的情况下,我不确定已部署的应用程序是否具有读取权限LDAP服务器。



有没有其他方法来验证用户而无需在他们的域/内联网中托管LDAP的应用程序,这是另一种方式在我的情况下实现LDAP以及客户端所需的输入是什么,如任何访问权限或权限?


这篇关于LDAP集成与Internet应用程序的MVC应用程序。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆