【问题标题】:Trying to save Lync Conversation History by using Lync Client SDK from Exchange Server but "Conversation History" folder is not Present尝试使用 Exchange Server 中的 Lync Client SDK 保存 Lync 对话历史记录,但“对话历史记录”文件夹不存在
【发布时间】:2016-08-23 15:03:53
【问题描述】:

我正在尝试使用 Exchange Server 中的 Lync Client SDK 保存 Lync 对话历史记录,但“对话历史记录”文件夹不存在如何获取或创建此文件夹?

正在尝试使用以下代码..

 class Program
{
    static void Main(string[] args)
    {

        ExchangeService svc=new ExchangeService(ExchangeVersion.Exchange2010_SP1);

        svc.Credentials = new NetworkCredential("User", "Password", "Domain");

        svc.Url = new Uri("https://Domain/EWS/exchange.asmx");
        svc.UseDefaultCredentials = true;
        ServicePointManager.ServerCertificateValidationCallback = (sender, certificate, chain, sslPolicyErrors) => true;
        FindFoldersResults results = svc.FindFolders(WellKnownFolderName.MsgFolderRoot, new FolderView(100));
        Folder MyFolder = null;
        foreach (Folder item in results)
        {
            Console.WriteLine(item.DisplayName.ToString());

            if (item.DisplayName == "conversation history")
            {
                Console.WriteLine("Conversation History Found.");
                MyFolder = Folder.Bind(svc, item.Id);
                break;
            }
        }
        Console.ReadLine();
}

【问题讨论】:

    标签: .net exchange-server lync-client-sdk lync-server-2013


    【解决方案1】:

    您可以使用类似的方式创建文件夹

     Folder ConversationHistory = new Folder(service);
     ConversationHistory.DisplayName = "Conversation History";
     ConversationHistory.FolderClass = "IPF.Note";
     FolderId MailboxToAccess = new FolderId(WellKnownFolderName.MsgFolderRoot,"Mailbox@domain.com");
     ConversationHistory.Save(MailboxToAccess);
    

    我建议您始终使用 FolderId 重载并指定要访问的邮箱为 using

    FindFoldersResults results = svc.FindFolders(WellKnownFolderName.MsgFolderRoot, new FolderView(100));
    

    模棱两可,您访问的邮箱可能与您期望的不同。

    【讨论】:

      猜你喜欢
      • 2016-12-25
      • 2012-03-26
      • 2015-09-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-02-23
      • 2011-09-07
      相关资源
      最近更新 更多