LDAP/AD认证 [英] LDAP/AD authentication

查看:416
本文介绍了LDAP/AD认证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用Visual Studio 2010创建的简单我的ASP.NET应用程序"并重新编码"Login.aspx",以使其与Active Directory LDAP兼容.
其他工作人员则希望Web东西的所有编码都在Visual Basic中并使用Visual Studio 2010完成.

我是使用上述工具的新手,大约一个月前才开始使用ASP.

在过去的几天里,我一直在用google搜寻网络,我感觉我的大脑正在漏掉我的耳朵-大多数工作示例都在C#中进行.

第1部分是使用最小数量的Cruft修改web.config以建立基本的LDAP连接

第2部分是修改Login.ASPX后面的HTML,VB代码,以便将正确的令牌传递回Default.aspx,以表明已使用VALID LDAP/AD用户的凭据.

有人有任何链接吗?
还是有人想自愿编写代码?

Rich Leonard

I would like to take the simple "My ASP.NET Application" that Visual Studio 2010 creates and recode the "Login.aspx" to work against Active Directory LDAP.

the other staffers would prefer that all coding for the web stuffs be done in Visual Basic and using Visual Studio 2010.

I an am extreme newbie with the above tools and have only started working with ASP about a month ago.

I''ve been scouring the web with google for the past few days and I have a feeling my brains are leaking out my ears - most of the working examples are in C#.

Modifying web.config with the MINIMAL amount of cruft to make a basic LDAP connection is part 1

Part 2 is modifying the HTML, VB code behind of the Login.ASPX so that it passes back to the Default.aspx the right token to say a VALID LDAP/AD user''s credentials were used.

Anyone have any links?
or anyone want to volunteer code?

Rich Leonard

推荐答案

您无需重新编码Login.aspx即可与Active Directory配合使用.
您需要基于活动目录创建.NET成员资格提供程序.

看看这篇文章:

活动目录成员身份

您的代码将几乎保持不变.比较常规的aspnet成员资格提供程序和Active Directory成员资格提供程序有一些限制.但是您必须要做家庭作业.
You don''t need to recode your Login.aspx to work against Active Directory.
You need to create a .NET membership provider based on the active directory.

Look into this article:

Active directory membership

Your code will stay almost the same. There are some limitations comparing regular aspnet membership provider and active directory membership provider. But you will have to do your home work.


RMLeonard,

如我所知,您希望在asp.net中进行Windows身份验证.
所以我认为您只需要在web.config中添加这些代码:

Hi RMLeonard,

As I underestood you want windows authentication in your asp.net.
So I think you just need to add these code in your web.config:

<authentication mode="Windows"/>
<authorization>
    <deny users="Anonymous"/>
</authorization>



并设置IIS来完成其余的工作.



and set your IIS to do the rest.


这篇关于LDAP/AD认证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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