I am building a proof of concept on a new box that has been set up with Windows Server Standard running IIS 7.
The task I need to do is take the logged in user and using Office Communicator 2007 check for the presence (and type of presence, online, offline, away, busy etc) of other users on the exchange box on the same machine.
The code seems pretty simple:
public string GetStatus(string username)
{
try
{
if(this.CurrentCommunicator == null)
this.CurrentCommunicator = new CommunicatorAPI.MessengerClass();
this.CurrentCommunicator.Signin(0, "********", "*****");
if (CurrentCommunicator != null)
{
foreach (IMessengerContact contact in CurrentCommunicator.MyContacts as IMessengerContacts)
{
if (!contact.IsSelf)
if (contact.SigninName.Contains(username))
{
MISTATUS status = contact.Status;
return GetStatusString(status);
}
}
}
}
catch (Exception ex)
{
return ex.Message;
}
return "Unknown";
}
I am logged into Office Communicator 2007 with the correct u/p so OCS instantiates, but when the code attempts to loop round the Contacts:
foreach (IMessengerContact contact in CurrentCommunicator.MyContacts as IMessengerContacts)
it throws this error:
Retrieving the COM class factory for component with CLSID {8885370D-B33E-44B7-875D-28E403CF9270} failed due to the following error: 80070005.
Chris Crowe's blog seemed to offer a way forward but after changing the launch and activation permissions of 'Office Communicator Messenger Class' so that 'Network Service' had local launch activation rights - there was no change in the COM error that was being thrown.
I've also tried giving 'Everyone' launch and activation permissions with no change.
I've read through a slew of OCS articles, but I can't seem to solve this problem. Please help before I wrench out more clumps of hair.
How can I write my own C# program for login in Office Communicator http://www.mombu.com/microsoft/live-communications-server-developer/t-how-i-can-write-my-own-c-program-for-login-in-office-comunicator-927275.html
How to get presence using office communicator sdk http://blogs.msdn.com/b/cmayo/archive/2009/09/21/how-to-get-presence-using-office-communicator-sdk.aspx
The Office Communicator Automation API in 2 minutes http://blogs.msdn.com/b/cmayo/archive/2009/01/08/the-office-communicator-automation-api-in-2-min.aspx
Using the Office Communicator Automation API http://blogs.msdn.com/b/midunn/archive/2008/03/09/using-the-communicator-automation-api.aspx
Building a custom contact list in Office Communicator http://msdn.microsoft.com/en-us/library/bb758709(v=office.12).aspx
How Does the Office Communicator Presence Status Work? http://stackoverflow.com/questions/2506961/how-does-the-office-communicator-presence-status-work
Detecting user presence http://stackoverflow.com/questions/1014392/detecting-user-presence
Configuration Information for OWA 2010 Form Authentication http://www.stone-ware.com/cloud/support/3rdPartyDetails.jsp?id=216
Getting Started Using Office Communicator Automation API http://msdn.microsoft.com/en-us/library/bb758820(office.12).aspx
Office Communicator 2007 Development Environments For .NET Framework Applications http://msdn.microsoft.com/en-us/library/bb787231(v=office.12).aspx
Event ID 56013 with an error code of 80070005 is logged in Event Viewer when you change the password for Office Communications Server 2007 service accounts http://support.microsoft.com/kb/953112/en-us
Fixing Office COM 80070005 errors by changing 'Launch and Activation' permissions http://blog.crowe.co.nz/archive/2006/03/02/589.aspx
Sign into Communicator (Office Communicator 2007) http://office.microsoft.com/en-gb/communicator-help/sign-in-to-communicator-HA010206469.aspx?redir=0
AutoLogin into OCS API example http://social.msdn.microsoft.com/Forums/en-US/ucclientsdk/thread/bc0ba921-7cc5-4098-b137-ffb85d667e58
Office 2007 - Interface Member Invocations http://msdn.microsoft.com/en-us/library/bb758725(v=office.12).aspx