How to setup Quest ARS SDK to work with ASP.NET and C#..?

Hi All,

I am working on a project to develop a web portal (or Web Site) internally for my organization which provides the users with an interface to work with Active Directory. I am developing the site using ASP.NET and C#.

The application am trying to develop should communicate to Active Directory using ARS instead of native LDAP queries.

I have been trying to setup this using the Quest ARS SDK but am having a tough time doing it. I have a few questions on how to implement it.

What are the libraries and assemblies that I need to import in order to work with ARS using C#..?

What is EDMS and ADSI Provider..? and where do I find them and Where do I install them so that I can use them in my C# Application..?

Please help me in setting up the Quest ARS SDK with ASP.NET and C#.


  • First of all, do you realize that ARS comes with a very nice, easily customizable web interface?  You might want to look at that before you build something and at least use it as a base for your solution.

    To answer your question though, the ADSI provider is a set of libraries that helps you to interface with ARS/AD.  The install package is found in this folder among the install media:

    \Solutions\Free Tools\ActiveRoles ADSI Provider

    If you are going to be writing code to talk to AD, you might also consider using the powershell cmdlets that ship with ARS too:

    \Solutions\Free Tools\Management Shell for Active Directory

  • Hi Johnnyquest,

    Thanks for your reply. I do realize that ARS comes with a Web Interface and tried to implement it but we have decided to develop our own custom application.

    I was able to connect to ARS Service in a domain using ADSI Provider. We have different domains in our environment with trust enabled between them. Now, I am trying to connect to ARS service running on another domain but am unable to connect. It says, "The Active Roles Administration Service is not available".

    Do you have any idea on how I can connect to ARS Service on a different domain using C#..?


  • I can't speak to C# directly, but in powershell I would use a Dell cmdlet like this:

    connect-qadservice -Service <ARS server FQDN>

    You will probably need to supply credentials on the above command line as well. i.e. -User, -Pwd

    BTW, the Dell cmdlets such as Get-QADuser all have a "-proxy" switch that tells the cmdlet to access AD via the ARS server you have connected to.  This makes life much simpler.

  • Thanks again Johnny,

    I was successfully able to connect and query to the other domain using VBScript using IADSOpenDSObject. Below is the code in VBScript..

    Const ADS_EDMSERVER_BIND = 32768
    Set openDS = GetObject("EDMS:")
    Set objUser = openDS.OpenDSObject("EDMS://SERVERNAME.DOMAINNAME/<DN of the Object>", "XXX\Username", "PASSWORD", ADS_EDMSERVER_BIND)
    strServiceName = objUser.GetOption(ADS_OPTION_SERVERNAME)
    MsgBox "The connected service name: " + strServiceName + " SamAccountName: " + objUser.SamAccountName

    The same way I am trying to connect using C# but it is failing.. I really need someone who can help me achieve the same using C#.. Below is the code in C#..

    DirectoryEntry de = null;
    IADsOpenDSObject iadsobj = null;
    IADs iads = null;

    iadsobj = (IADsOpenDSObject)Marshal.BindToMoniker("EDMS:");

    iads = (IADs)iadsobj.OpenDSObject("EDMS://SERVERNAME.DOMAINNAME/<DN of the Object>", "XXX\Username", "PASSWORD", 32768);
    de = new DirectoryEntry(iads);

    Any thoughts... ?