I have code which sends a file to a client & on another side I'm receiving it using ContentAdded event. That event gets raised but CanInvoke is returning false. Where I'm getting wrong?
void _sharingModality_ContentAdded(object sender, ContentCollectionChangedEventArgs e)
{
if (e.Item.Type == ShareableContentType.NativeFile)
{
int hr;
if (e.Item.CanInvoke(ShareableContentAction.DownloadFile, out hr))
{
MessageBox.Show("download event raised");
}
else
{
MessageBox.Show("u cannot invoke download");
}
}
}
Thanks!
(Note: I'm using Lync client 2013)
EDIT 1:
CanInvoke returns true if I put a message box before that statement, otherwise returns false. Is it affecting some background thread or something?