【发布时间】:2018-04-24 06:38:04
【问题描述】:
我正在尝试访问一些共享邮箱(“打开这些额外的邮箱”列表),但我遇到了一种“访问被拒绝”。 把我的意思说清楚......我写了这段代码:
IList<Store> lsStores = Application.Session.Stores.Cast<Store>().Where(c => c.ExchangeStoreType == OlExchangeStoreType.olExchangeMailbox).ToList();
但我有这个错误(在日志文件夹中):
System.Runtime.InteropServices.COMException (0xAD54011D):异常 来自 HRESULT:0xAD54011D 在 System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 错误代码,IntPtr 错误信息) 在 System.Runtime.InteropServices.CustomMarshalers.EnumeratorViewOfEnumVariant.MoveNext() 在 System.Linq.Enumerable.d__95
1.MoveNext() at System.Linq.Enumerable.WhereEnumerableIterator1.MoveNext() 在 System.Collections.Generic.List1..ctor(IEnumerable1 集合) 在 System.Linq.Enumerable.ToList[TSource](IEnumerable`1 源) 在 Detatchatore.Detachatore.btnAvvia_Click(Object sender, EventArgs e) 在 C:\Users\Me\Project\Form1.cs:line 52
在我的个人计算机中,此错误未显示,我的同事也没有此问题。但是当我将应用程序安装到操作员电脑中时(应用程序必须在他的电脑上工作),我有这个例外。 谢谢,对不起我的英语不好。
【问题讨论】:
标签: c# exception outlook interop