- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
该代码在我的本地机器上运行良好,但是当发布到服务器时,它在服务器上抛出 DirectoryServiceCOMException
results = mySearcher.FindAll();
代码行。我的函数传递两个搜索框的内容,用户可以在其中按姓名或职位查找员工:
// Bind to the users container.
string path = "LDAP://DC=DOMAIN,DC=TLD";
DirectoryEntry entry = new DirectoryEntry(path);
// Create a DirectorySearcher object.
DirectorySearcher mySearcher = new DirectorySearcher(entry);
// Set a filter for users with the name test.
mySearcher.Filter = "(&(objectClass=user)";
if (employeeName != "")
{
mySearcher.Filter = mySearcher.Filter + "(name=*" + employeeName + "*)";
}
if (position != "")
{
mySearcher.Filter = mySearcher.Filter + "(title=*" + position + "*)";
}
mySearcher.Filter = mySearcher.Filter + ")";
mySearcher.Sort = new SortOption("sn", System.DirectoryServices.SortDirection.Ascending);
// Use the FindAll method to return objects to a
// SearchResultCollection.
results = mySearcher.FindAll();
最佳答案
可能的原因:
关于c# - 生产环境中的 DirectoryServicesComException 而不是本地计算机 C# ASP.net,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8447544/
我正在构建一个网站,让用户使用他们的 Active Directory 帐户登录,我想通知用户登录失败的原因。 背景 登录通常会因用户名/密码错误而失败,但也可能因密码过期或帐户被锁定而失败。 我正在
我在我的 asp.net MVC 解决方案中使用 AD 身份验证。它在本地服务器上工作,但是当我发布它时出现错误:“System.DirectoryServices.DirectoryServices
我正在尝试在 Windows Server 2008 R2(已安装 IIS7)上运行的 ASP.Net (4.0) 应用程序中查询 AD。 (它在作为 2.0 应用程序运行时也会失败) 这对我来说并不
我有相同的网络应用程序在其他三台服务器上运行。有人知道为什么第四台服务器无法工作吗?查看错误和堆栈跟踪: An operations error occurred. Description: An u
该代码在我的本地机器上运行良好,但是当发布到服务器时,它在服务器上抛出 DirectoryServiceCOMException results = mySearcher.FindAll(); 代码行
由于某种原因,在星期一,上周运行的代码突然开始出现以下错误。 System.DirectoryServices.DirectoryServicesCOMException (0x800700EA):
为重复 System.DirectoryServices.DirectoryServicesCOMException: An operations error occurred 道歉但我还不能发表评论
我正在尝试获取在本地 Intranet 上提交 ASP.NET 表单的用户的电子邮件地址。在我的本地机器上测试时,它工作正常。但是当我发布并开始在生产中测试它时,它不喜欢第 74 行。 Server
我正在尝试使用 System.DirectoryServices.AccountManagment 确定用户是否是给定组的成员。 我在 64 位系统上的 SharePoint 2007 中的 Shar
当请求来自 Web 服务器时,我在 IIS 7.5 上运行的 ASP.NET WebForms 应用程序工作正常,但当同一域用户从域中的任何其他计算机请求同一页面时抛出以下错误: TYPE: Syst
以下代码在我的开发 PC 上运行良好,但在部署到服务器时崩溃: using System.DirectoryServices.AccountManagement; using (var ctx = n
介绍 我正在维护一个查询 Active Directory 的旧版 ASP.NET 3.5 应用程序。该应用程序使用“集成 Windows 身份验证”,旨在使用其自己的安全上下文而不是专用的用户名和密
我在查找 ASP.NET 4 应用程序在尝试获取给定用户的用户组时失败的问题时遇到了麻烦。与此应用程序关联的应用程序池设置为在 ApplicationPoolIdentity 下运行。 异常信息 Sy
我是一名优秀的程序员,十分优秀!