locked
Problem with:Directory Services doesnt exist in the namespace Syst RRS feed

  • Question

  • Hi

    I developed a webpart using usercontrol where it access the active
    directory.When i try to deploy it on a sharepoint site ,throwing an error of
    the type

    An error occurred during the compilation of the requested file, or one of
    its dependencies. The type or namespace name 'DirectoryServices' does not
    exist in the namespace 'System' (are you missing an assembly reference?)

    But ,i have added the reference System.Directoryservices to the project.

    Can anyone help me to solve the problem

    Thanks
    Wednesday, September 28, 2011 9:16 AM

Answers

  • Hai

    To solve this problem add system.directory service dd detail to sharepoint webconfig complier tag.

    Friday, September 30, 2011 11:46 AM

All replies

  • Hi Rathi,

     

    Is the System.DirectoryServices assembly in GAC? If not, please add it to the GAC and try again, you can try the steps in the following link: http://support.microsoft.com/kb/324168

     

    If it doesn’t work, please go to the property of the reference in the project, change “Copy Local” from “false” to “true”, check whether it works.

     

    If it isn’t the issue, please feel free to let me know.

     

    Thanks,
    Qiao

    Friday, September 30, 2011 2:20 AM
    Moderator
  • Hai

    To solve this problem add system.directory service dd detail to sharepoint webconfig complier tag.

    Friday, September 30, 2011 11:46 AM