如何告诉ASP.NET应用程序使用哪个Active Directory?
IIS配置:如何告诉ASP.NET应用程序使用哪个Active Directory?,asp.net,asp.net-mvc,iis,active-directory,windows-authentication,Asp.net,Asp.net Mvc,Iis,Active Directory,Windows Authentication,IIS配置: Anonymous Authentication Enabled ASP.NET Impersonation Enabled Windows Authentication Enabled *the rest is disabled Web.Config: <add name="ADConn" connectionString="LDAP://192.168.0.21" /> . . . <authentication mode="Wi
Anonymous Authentication Enabled
ASP.NET Impersonation Enabled
Windows Authentication Enabled
*the rest is disabled
Web.Config:
<add name="ADConn" connectionString="LDAP://192.168.0.21" />
.
.
.
<authentication mode="Windows" />
<authorization>
<allow users="*"/>
<deny users="?" />
</authorization>
<roleManager enabled="true" defaultProvider="AspNetWindowsTokenRoleProvider"/>
<identity impersonate="true"/>
<membership defaultProvider="ADMembership">
<providers>
<add name="ADMembership"
type="System.Web.Security.ActiveDirectoryMembershipProvider"
connectionStringName="ADConn"
connectionUsername="dominic"
attributeMapUsername="sAMAccountName"
connectionPassword="p@ssw0rd" />
</providers>
</membership>
我正在尝试将我的应用程序从窗体转换为Windows身份验证。使用此配置,页面会提示我登录对话框。当我使用我的广告帐户时,我不能登录,但当我使用我的本地帐户时,我可以访问该页面。为什么?我如何告诉我的应用程序使用特定的广告?我的配置正确吗
重要提示:
- 我的IIS和AD位于不同的计算机上,它们不在同一个域上李>
- 我的IIS和客户端在同一台计算机上李>
- 我的应用程序使用AD进行表单身份验证
- IIS版本:6.1
- MVC版本:4
- 广告操作系统:Windows 2008
- 客户端和IIS操作系统:Windows 7
- 以下是我认为正在发生的事情
当您尝试打开应用程序时,浏览器将发送您当前的广告凭据(如果IE配置为自动执行此操作)
由于您使用的是asp.net模拟,因此如果广告帐户无权访问应用程序文件夹,它将尝试使用匿名用户帐户,而匿名用户帐户也无权访问。
您可能需要为IIS中定义的匿名用户向应用程序文件夹添加安全访问权限,否则将从IIS中删除匿名访问权限
您可以查看以下链接以了解设置权限准则
我不明白。我禁用了模拟和匿名身份验证,但仍然无法使用我的AD帐户登录。我在web.config中的配置如何?我是否应该添加或删除某些内容?尝试将您的用户名添加到应用程序的安全权限中。folderMy IIS和AD位于不同的计算机上,并且它们不在同一个域中。如果服务器找不到该用户,他将要求输入用户名和密码,并使用AD解决这些问题,但要做到这一点,IIS和AD应该在同一个域中
[Authorize]
public class HomeController : Controller
{