Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Lync client state invalid

Tags:

c#

lync

lync-2010

When using the Lync 2010 API the LyncClient can get in the Invalid state. This occurs if for instance the Lync process is shut down. When Lync is started again a call to Lync.GetClient() returns a Lync client reference in an Invalid state. Reading the MSDN documentation is not very useful - the Invalid state is not described: http://msdn.microsoft.com/en-us/library/microsoft.lync.model.clientstate_di_3_uc_ocs14mreflyncclnt.aspx

My question is; how can I retrieve a Lync client reference which is not in an Invalid state?

Thanks!

like image 780
Nicklas Møller Jepsen Avatar asked Oct 09 '22 13:10

Nicklas Møller Jepsen


1 Answers

The answer to my question/problem is to call the GetClient() from the same thread as it is called from the first time. This seems to never get a client in the Invalid state.

like image 85
Nicklas Møller Jepsen Avatar answered Oct 12 '22 10:10

Nicklas Møller Jepsen