在使用某个用户ID初始化NotesSession之后,会话被初始化,但属性NotesSession.AddressBooks变为NULL。它仅适用于某些用户ID,但我找不到任何原因,这些用户有什么问题。
NotesSession session = new NotesSession();
session.Initialize(password);
if (session.AddressBooks != null)
{
Console.WriteLine(string.Format(CultureInfo.InvariantCulture, "addressBooks Length: {0}", session.AddressBooks.Length));
foreach (IDatabase addressBook in session.AddressBooks)
{
if (addressBook.IsPublicAddressBook)
{
addressBookInfo.Add(addressBook.FilePath, addressBook.FileName);
Console.WriteLine(string.Format(CultureInfo.InvariantCulture, "addressBook.FileName:{0} ", addressBook.FileName));
Console.WriteLine(string.Format(CultureInfo.InvariantCulture, "addressBook.FilePath:{0} ", addressBook.FilePath));
Console.WriteLine();
}
else
{
Console.WriteLine(string.Format(CultureInfo.InvariantCulture, "addressBook.IsPublicAddressBook: {0}", addressBook.IsPublicAddressBook));
Console.WriteLine(string.Format(CultureInfo.InvariantCulture, "addressBook.FileName: {0}", addressBook.FileName));
Console.WriteLine();
}
}
}
}
任何想法为什么会发生? 任何想法请帮助