Last post Aug 28, 2007 10:07 AM by DmitriG
Aug 27, 2007 05:17 AM|zuber|LINK
I am trying to access an Exchange Server from a web service deployed on another machine. I have a web service written in C# which uses MAPI33.NET library and runs perfectly on the machine Exchange Server. When I try to run the web service from another machine
it gives me an error:
"System.Runtime.InteropServices.COMException (0x800401F3): Invalid class string at CDO.FolderClass.Open()".
The web services performs the operation of accessing the exchange server to list the exchange folders for a particular user. I have registered the "Cdoex.dll" module on the second machine.
Am I doing something wrong ? Is there anything more to do ?
Any help will be highly appreciated.
Thanks and Regards,
Aug 27, 2007 09:33 AM|DmitriG|LINK
Installation of the Exchage Management Tols on your web server will solve you problem.
Aug 27, 2007 10:54 AM|zuber|LINK
Thanks for the reply.
I installed the Exchange Management Tools on the machine where the web service is supposed to run, but I still get the same error.
After installation, I tried restarting the IIS on machine2.
My deployment rules are:
1. Exchange Server 2K3 installed on machine1 (windows 2K3 server). machine1 is also the domain controller
2. machine2 (windows 2K3 server), where web service will run and will access the Exchange Server on machine1
3. machine1 and machine2 are in the same domain
Aug 27, 2007 11:19 AM|DmitriG|LINK
Check if you are running the same version of Exchange 2K3 service pack on both computers.
Can you manage Exchange on machine1 from ESM running on machine2?
Is your application pool identity (or impersonated identity) has enough access rights?
Aug 28, 2007 02:57 AM|zuber|LINK
I am running the same version of Exchange 2K3 service packs (SP2) on both computers.
I am even able to manage the Exchange on machine1 from ESM running on machine2.
I have created a user 'test' with full rights to access the Exchange server. On the ASP.NET tab of the virtual directory properties I have checked the Local impersonation box, and gave the username as '<domain>/test' with its password.
On the 'directory security tab->Authentication and access control' the 'Enable anonymous access' is checked along with 'Basic Authentication' checked.
CDO.FolderClass.Open() is called with the following parameters:
Am I missing anything ?
Thanks for the help.
Aug 28, 2007 10:07 AM|DmitriG|LINK
Can you post a snippet for code that generates error?
Did you try to do the same on machine2 using VBS? You can find examples in Exchange 2000/2003 SDK.