I am developing simple chat application using CWE which sends messages by using contextual data. I'm having "Specified method is not supported" exception message. This exception occurs when I try to start chat with group. one-to-one chat works fine with no exception. since I'm having same code on both sender & receiver side, I'm confused that how to make this work. Please help.

My code snippet as as follows.

void method1()
    {
        //
        //here I have code to send an IM saying "lets chat in extension window" 
        //

        try
        {
                Dictionary<ContextType, object> context = new Dictionary<ContextType, object>();
                context.Add(ContextType.ApplicationId, "{1226271D-64C9-4F24-B416-E6A583F45A1C}");
                context.Add(ContextType.ApplicationData, "initial_data_request");
                try { IAsyncResult res = conversation.BeginSendInitialContext(context, null, null); }
                catch (Exception e1) 
                {
                    MessageBox.Show(e1.Data+"\n\n"+e1.Message);                        
                }
            }

        catch (Exception ee)
        {
            MessageBox.Show("Client Platform Exception: " + ee.Message);
        }
    }

This is the method I call when my application starts. It is supposed to send initial context so that receiver clients when receive this should open my extension application.

有帮助吗?

解决方案

I found the answer. It is showing that exception because contextual data will not work in a group conversation. Found the related thread here.. http://social.msdn.microsoft.com/Forums/lync/en-US/b4e46648-7097-4348-8327-6864f1c12ab2/contextdata-in-a-group-conversation?forum=communicatorsdk

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top