Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/33.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/azure/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/reporting-services/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Asp.net 使用LDAP的Active Directory成员资格提供程序_Asp.net_Azure_Active Directory_Ldap_Membership Provider - Fatal编程技术网

Asp.net 使用LDAP的Active Directory成员资格提供程序

Asp.net 使用LDAP的Active Directory成员资格提供程序,asp.net,azure,active-directory,ldap,membership-provider,Asp.net,Azure,Active Directory,Ldap,Membership Provider,我正在做一个学校作业,在那里我们使用Active Directory处理asp.NET编写的web应用程序的登录。我们的Active Directory安装在Azure上的虚拟机上 尝试登录时,出现以下错误: 我已多次检查连接字符串,但似乎无法使其正常工作 目前,我有以下连接字符串: <add name="ADConnectionString" connectionString="LDAP://ictforevents1.cloudapp.net/DC=ictforevents1,DC=c

我正在做一个学校作业,在那里我们使用Active Directory处理asp.NET编写的web应用程序的登录。我们的Active Directory安装在Azure上的虚拟机上

尝试登录时,出现以下错误:

我已多次检查连接字符串,但似乎无法使其正常工作

目前,我有以下连接字符串:

<add name="ADConnectionString" connectionString="LDAP://ictforevents1.cloudapp.net/DC=ictforevents1,DC=cloudapp,DC=net" />

分配给虚拟机的DNS名称是ictforevents1.cloudapp.net,这也是我在Active Directory安装向导中设置的域

使用上面连接字符串中的数据,我可以使用LDAP Admin连接到AD


如何修复此错误?

我通过在连接字符串中用IP地址替换域来修复此问题。据我所知,asp将始终尝试使用安全连接,即使使用不安全的端口(389)。当给定IP地址时,它不会尝试此操作

我的新连接字符串是:

<add name="ADConnectionString" connectionString="LDAP://23.97.173.160:389/CN=Users,DC=ictforevents1,DC=cloudapp,DC=net" />


虽然这并不理想,因为服务器没有静态IP,但总比根本不工作要好。

我通过在连接字符串中用IP地址替换域来解决这个问题。据我所知,asp将始终尝试使用安全连接,即使使用不安全的端口(389)。当给定IP地址时,它不会尝试此操作

我的新连接字符串是:

<add name="ADConnectionString" connectionString="LDAP://23.97.173.160:389/CN=Users,DC=ictforevents1,DC=cloudapp,DC=net" />


虽然这并不理想,因为服务器没有静态IP,但总比根本不工作要好。

您是否在同一台机器上运行web应用程序和ldap管理员?@CosminOnea是的,asp应用程序与ldap管理员在同一台机器上运行。我使用vs 2013进行调试。您是否在同一台计算机上运行web应用程序和ldap管理员?@CosminOnea是的,asp应用程序与ldap管理员在同一台计算机上运行。我使用vs 2013进行调试。您是否在同一台计算机上运行web应用程序和ldap管理员?@CosminOnea是的,asp应用程序与ldap管理员在同一台计算机上运行。我使用vs 2013进行调试。注意,在角色提供程序工作之前,需要从连接字符串中删除端口;注意,在角色提供程序工作之前,需要从连接字符串中删除端口;注意,在角色提供程序工作之前,需要从连接字符串中删除端口