2013-04-29 82 views
1

我正在使用SharePoint聯機並使用Windows Azure來託管訪問SPO的進程。SharePointOnlineCredentials拋出ComException

我們已經爲Azure角色添加了啓動任務來安裝http://www.microsoft.com/en-nz/download/details.aspx?id=35585。我們的第一個問題是它不會安裝,因爲osFamily是1(Server 2008 R2是一個prereq)。

嘗試實例化SharePointOnlineCredentials對象時,我們現在看到此錯誤。

應用程序:WaWorkerHost.exe Framework版本:v4.0.30319 說明:由於未處理的異常而終止進程。 異常信息信息:System.Runtime.InteropServices.COMException 堆棧: Microsoft.SharePoint.Client.Idcrl.ManagedIdcrl.EnsureInited() 在Microsoft.SharePoint.Client.Idcrl.ManagedIdcrl.LogonIdentity(System.String,System.Security。 SecureString) at Microsoft.SharePoint.Client.SharePointOnlineCredentials..ctor(System.String,System.Security.SecureString)

我能做什麼錯?

PS。我已將Microsoft.IdentiyModel v3.5設置爲複製本地

編輯:事件日誌顯示上述異常之前的異常,消息如下。 從我可以告訴這是MS在線助手的標誌。

Source MSOIDSVC.EXE。消息:InitializeSvcAPI失敗,hr = 0x80048883

回答

0

我有同樣的異常。要解決此問題,請執行以下操作:

使用您在應用程序(或應用程序池)中使用的帳戶在IE中連接到http://login.microsoftonline.com,然後從頁面安裝證書。

它解決了我的問題。

希望能有所幫助。