locked
Mail enable AD user - problems with cdo/cdoex etc RRS feed

  • Question

  • User224033974 posted

    hi there

     i am developing a asp 2.0 web age with Microsoft Visual Web Developer running on a WinXP machine.

    The destination system is a Win2k3 server running exchange on it too.

     I am currently working on a web based c# programm which handles AD user creation etc. The user and contact creation works fine but i have problems with mail enable a user by the exchange server. it does NOT work on the development machine (local host by the Visual Web Developer) but it DOES work on the IIS running on the destination Win2k3 system running exchange server on it. So my first guess was the missing libraries --> i installed the exchange management tools. i referenced the cdoex.dll out of the exchange mngmt tools install directory within my project. but no change at all - the page compiles - runs - but an error occures when i try to mail anable the user-->

    HRESULT E_FAIL returned by the COM object ... something like this.

    it seems that i have serious probs with my *.dlls (cdo.dll, cdoex.dll, cdoexm.dll ...) . i am sure that i have to re-register the dlls in windows (regsvr.exe) and add them as a reference in my development software, but i dont really know which dlls i have to register ...

     maybe anybody has a little "cookbook" for registering or referencing ?

    atm i use these libraries for user creation within AD and mail enable -->

    using CDOEXM;

    using CDO;

    using ADODB;

    thank you very much for your time !

    best regards, sepp o/

    Friday, November 3, 2006 6:01 AM

All replies

  • User1297008538 posted
    Can you post your code please?
    Wednesday, November 8, 2006 1:22 AM
  • User224033974 posted

    hi

     here is the function.

    the program combiles without errors or warnings. Again, the whole project works fine on the server, when i deploy this page on an IIS 6.0 server on a win2k3 server.

    But locally on the Visual Web Developer 2005 Express Edition localhost, an error occurs durint the mail anble process!-->the catch exeption is being called ! by the moment this function is being called the user has been created within the AD.

    developer machine:

    WinXP - Prof

    Microsoft Exchange Mngmt Tools installed(out of the exchange 2003 server install cd) - to get the proper cdoexm.dll - got this advice on another side, as the cdoexm.dll out of outlook does NOT suit for handling exchange events.

     

    =====================

    using CDOEXM;

    using CDO;

    using ADODB;

    public bool mail_Enable_user(string path, string MDB )

    {

    DirectoryEntry entry = new DirectoryEntry();

    entry.Path = path;

    CDOEXM.IMailboxStore mailbox;

    mailbox = (IMailboxStore)entry.NativeObject;

     

    try

    {

    mailbox.CreateMailbox(MDB);

    entry.CommitChanges();

    }

    catch (Exception)

    {

     

    throw;

    }

    return false;

    }

    =====================

    thank you very much for your time !

     best regards, bill

    Thursday, November 9, 2006 7:42 AM
  • User224033974 posted

    as i didnt find an "edit post " button ;-) -->

    i forgot to mention, that the win2k3 server is running an exchange 2003 server too --> and here is the problem i think.

    As i have only running the exchange mngmt tools on the develop machine, i dont have all or the right *.dlls.

    But, there must be an solution other than installing the complete exchange 2003 server on my development machine furthermore, afaik it is not possible to run an exchange server on winxp-prof.

    bill

    Thursday, November 9, 2006 7:47 AM