【问题标题】:DirectoryEntry is not getting even add the namespace System.DirectoryServices? [closed]DirectoryEntry 甚至没有添加命名空间 System.DirectoryServices? [关闭]
【发布时间】:2013-06-23 05:40:12
【问题描述】:

在我的 Web 应用程序中,我想创建一个 DirectoryEntry.. 类型的对象,但它不会在 .aspx.cs 文件上生成,即使我添加了命名空间并且我的 web.config 包含

<add assembly="System.DirectoryServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>

&lt;assemblies&gt; 部分。

会是什么原因?请帮忙

【问题讨论】:

    标签: c# asp.net namespaces


    【解决方案1】:

    也许您应该添加对 System.DirectoryServices.dll 的引用?

    【讨论】:

    • 怎么样? @DreamChild
    【解决方案2】:

    在 Visual Studio 上,右键单击您的项目。选择添加引用,.net 选项卡上的选择,并添加 System.DirectoryServices 引用。

    【讨论】:

    • 我已经添加了@Yan Zhao
    猜你喜欢
    • 1970-01-01
    • 2023-03-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-12-05
    • 2012-06-20
    • 1970-01-01
    • 2018-10-04
    相关资源
    最近更新 更多