I have a Windows service that uses the Microsoft Lync 2010 SDK. When I run the service locally, everything seems to be running as expected. When I try deploying the code to a VM, when I try starting a service, it errors out saying
The Foo service on Local Computer started and then stopped. Some services stop automatically if they are not in use by other services or programs.
Looking at event viewer, I see an exception
Service cannot be started. Microsoft.Lync.Model.LyncClientException: Generic COM Exception. Code is 0x80080005.
at Microsoft.Lync.Model.LyncClient.EnsureOI()
at Microsoft.Lync.Model.LyncClient.GetClient()
I tried installing Visual studio and the windows lync 2010 SDK on the VM but that did not fix the problem either. Is there anything else I should be trying?
EDIT:
A combination of restarting the VM and restarting the lync client seems to fix the issue but that is the most unsatisfying solution.