none
Does EWS Managed API will run on Windows Server 2003? RRS feed

  • Question

  • Hello everyone,

    I'm definitely not an administration guy and I have to ensure whether EWS Managed API (even ealiest version) will run on Windows Server 2003 which has installed Exchange Server 2007. I found that EWS API supports Exchange 2007 and newer, but what if Exchange 2007 is installed on Windows Server 2003, does it matter ? I guess the only requirement is .NET Framework 3.5.

    I just want to migrate (rewrite) from c++ MAPI calls and still support Windows Server 2003 (here will be grateful for the exact system version or service pack is supported).

    Many thanks in advance!


    Tuesday, May 15, 2012 6:53 PM

Answers

  • >>is there any way to access email account name for the known MAPI profile name using EWS?

    The Mapi Profile Name could be anything you should be able to grab the displayname from the Mailbox from IMsgStore in Mapi or if you read the profile registry Keys its store there also. Is their any parameter your trying to do discovery on ?  to use EWS you need the PrimarySMTPAddress for the account which you can get from Active Directory.

    >> btw I found there is no way to list all available profiles

     You can read the out of the Registry

                        String RootKey = @"Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\";
                        RegistryKey pkProfileskey = Registry.CurrentUser.OpenSubKey(RootKey, true);
                        var DefaultValue = pkProfileskey.GetValue("DefaultProfile");
                        String[] SubKeys = pkProfileskey.GetSubKeyNames();
                        if (DefaultValue != null)
                        {
                            ProfileCombo.Text = (String)DefaultValue;
                        }
                        foreach (String Profilekey in SubKeys)
                        {}
    There is also the Account Management API http://blogs.msdn.com/b/stephen_griffin/archive/2008/07/02/managing-the-outlook-account-management-dialogs.aspx . Or another option would be the ProfMan library from redemption http://www.dimastr.com/redemption/profman.htm which is easier to use.
    Friday, June 1, 2012 8:24 AM

All replies

  • Yes it will the only requirement would be the .NET 3.51 (if its Exchange 2007 on windows 2003 then you would be running 64 bit version of Windows so grab the 64 bit version of the Managed API)

    However you might want to consider running your code on a server other the Exchange Server. One advantage of EWS is that all the communication is over HTTPS/SOAP so it can be run anywhere. Not running your code directly on the Exchange box may improve the reliability of the Exchange server if your application has an issue etc. (that's if another box is available).

    The other thing of note is there are a few things you might be doing in MAPI that you won't find in EWS (eg exporting to a MSG file, using GetMailboxTable). 

    Cheers
    Glen

    Wednesday, May 16, 2012 5:58 AM
  • Many thanks for all the hints Glen.

    I'm bringing back to live one product. Regarding MAPI, I'm not aware yet of all the MAPI calls I have to migrate, so maybe I will encounter something you've mentioned.  In such a case I'm afraid not to completely get rid of MAPI :/ , will need to use PInvoke I guess, the main goal is to move to entirely managed code.

    Going to inform here in case of other problems.

    Cheers,

    Paul

    Wednesday, May 16, 2012 12:05 PM
  • As a general rule Mapi isn't supported in .NET but I'd read http://blogs.msdn.com/b/stephen_griffin/archive/2009/04/03/mapi-and-net.aspx which explains why and what the pitfalls might be. EWS will cover most things so you will probably be okay its just a few specialised things you need to watch out for.

    Cheers
    Glen

    Thursday, May 17, 2012 6:46 AM
  • Hi again,

    I stuck with on thing:

    is there any way to access email account name for the known MAPI profile name using EWS?

    btw I found there is no way to list all available profiles ( which I also need) even using office interop namespaces.

     The legacy code connect via known profile name and this profile name is all I have now and from which I have to begin.

    If I retrieave account from profile name, everything else I will be able to do with EWS I guess.

    Many thanks in advance!

    Thursday, May 31, 2012 1:37 PM
  • >>is there any way to access email account name for the known MAPI profile name using EWS?

    The Mapi Profile Name could be anything you should be able to grab the displayname from the Mailbox from IMsgStore in Mapi or if you read the profile registry Keys its store there also. Is their any parameter your trying to do discovery on ?  to use EWS you need the PrimarySMTPAddress for the account which you can get from Active Directory.

    >> btw I found there is no way to list all available profiles

     You can read the out of the Registry

                        String RootKey = @"Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\";
                        RegistryKey pkProfileskey = Registry.CurrentUser.OpenSubKey(RootKey, true);
                        var DefaultValue = pkProfileskey.GetValue("DefaultProfile");
                        String[] SubKeys = pkProfileskey.GetSubKeyNames();
                        if (DefaultValue != null)
                        {
                            ProfileCombo.Text = (String)DefaultValue;
                        }
                        foreach (String Profilekey in SubKeys)
                        {}
    There is also the Account Management API http://blogs.msdn.com/b/stephen_griffin/archive/2008/07/02/managing-the-outlook-account-management-dialogs.aspx . Or another option would be the ProfMan library from redemption http://www.dimastr.com/redemption/profman.htm which is easier to use.
    Friday, June 1, 2012 8:24 AM