【发布时间】:2012-08-16 22:37:48
【问题描述】:
我正在将一个项目部署到 Windows Web Server 2008,但该项目收到以下错误消息:MyApps 中的错误;方法 MyApp.Page_Load。例外情况是:System.ArgumentException:(SAMAccountName=) 搜索过滤器无效。
在 web.config 的 system.web 部分中是 authentication mode="Windows"。 应用程序在尝试从 AD 获取用户名时失败使用:strUser = Context.User.Identity.Name。
IIS 配置为启用了 Windows 身份验证,并且禁用了所有其他身份验证模式。
不确定您可能还需要什么——我们将不胜感激!
【问题讨论】:
-
您在服务器上配置了 Active Directory 还是使用了 Active Directory 应用程序模式 (ADAM)?我猜 ADAM 没有 SAMAccountName 属性。
-
Active Directory 在服务器上
标签: c# asp.net iis windows-authentication