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#.

Thanks,
Vinay.

Parents
  • 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... ?

    Thanks,
    Vinay,

Reply
  • 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... ?

    Thanks,
    Vinay,

Children