我们有一个托管在本地服务器上的 ASP.Net MVC 5 应用程序,我们使用本地 LDAP (AD) 对用户进行身份验证。我们在 web.config
中使用以下连接字符串对用户进行身份验证。
LDAP://xx.xx.xx:389/OU=Users,OU=IS Accounts,DC=xx,DC=xx,DC=xx
现在我们已经在 Microsoft Azure 中创建并部署了相同的应用程序,并在 web.config
文件中为上述 LDAP 服务器添加了以下服务帐户凭据
<add name="ADMembershipProvider"
type="System.Web.Security.ActiveDirectoryMembershipProvider" connectionStringName="ADConnectionString"
connectionUsername="xxx\xxxx"
connectionPassword="xxxx"
attributeMapUsername="sAMAccountName" />
如果我们使用上述配置,我们会遇到连接问题(用户无法登录/访问被拒绝)。我们需要使用本地 LDAP 对用户进行身份验证。
我们不想使用 ADFS 或 Azure Active Directory 同步。这可能吗?如果是,本地 LDAP 服务器需要进行哪些安全设置?我们是否需要为我们的网站(网站 IP 地址)打开 LDAP 连接?
谢谢。 祖尔
最佳答案
你必须create a Virtual Network and connect it to your on-premises network .
然后,根据您使用的 Azure 服务(云服务 Web 角色或 Web 应用程序),您必须将该服务加入该虚拟网络:
- Integrate Azure Web App with Azure Virtual Network
- Connecting web or worker roles to an Azure Virtual Nrtwork .
最后但并非最不重要的一点是,您必须为 Azure 虚拟网络 IP 地址范围打开 AD 的 LDAP 端口。
关于c# - Azure ASP.Net MVC 5 的本地 LDAP 身份验证,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31399437/