実は、アクセスしようとしていますOutlook
Distribution Lists
。
で実行しようとすると、ローカル PC ですべて正常に動作しVisual Studio
ます。
しかし、host
アプリケーションをオンにWindows Server 2012
して実行しようとするとdomain
、error
.
を使用してOutlook 2007
います。のバージョンを 64 ビットに
インストールしました。64 bit
MS Office 2013
Windows Server
私のコードは次のとおりです。
Microsoft.Office.Interop.Outlook.Application OApplicaiton = new Microsoft.Office.Interop.Outlook.Application();
var outlook = new Application().GetNamespace("MAPI");
var folder1 = outlook.GetDefaultFolder(OlDefaultFolders.olFolderContacts);
System.Threading.Thread.Sleep(5000);
foreach (var curr in folder1.Items.OfType<DistListItem>())
{
Cmb_GlobalLists.Items.Add(curr.DLName);
}
そして私のerror
は:
Retrieving the COM class factory for component with CLSID {0006F03A-0000-0000-C000-000000000046} failed due to the following error: 80080005 Server execution failed (Exception from HRESULT: 0x80080005 (CO_E_SERVER_EXEC_FAILURE)).
誰でも私を助けることができますか?PIAと何か関係あるの?