SharePoint 2013中Office Web Apps的一次排錯

一隻老鼠發表於2013-08-16

轉自http://www.cnblogs.com/awpatp/archive/2013/06/06/3121420.html, 僅供自己檢視

筆者嘗試在自己的測試環境中為SharePoint 2013配置Office Web Apps, 遇到了下面的問題.

文件無法在IE中開啟, 報錯如下.

image

排查的過程如下:

1. 檢視SharePoint的ULS Log, 發現下面的條目:

06/05/2013 23:37:59.16    w3wp.exe (0x067C)    0x0124    SharePoint Foundation    Claims Authentication    aj0os    Exception    Exception occurred while creating an SPIdentityContext from SPUserToken '47e03bd70000000034000000efeeebea030000000c00000000000000dfdedbda0100000000000000010100000000000000000000'. System.NotSupportedException: Can not create an identity context for system account user token.     at Microsoft.SharePoint.IdentityModel.SPIdentityContext.Create(SPUserToken token, Boolean isShareByLinkGuestUser) StackTrace:  at onetnative.dll: (sig=6aba1f5f-ccc4-4590-af00-b8ffe7fe99a0|2|onetnative.pdb, offset=28BE6) at onetnative.dll: (offset=152A9)    19a6229c-9bdd-2062-33bb-ed8cf11e8631

2. 改用普通帳號登入SharePoint站點, 問題依然存在. 但是SharePoint ULS log已經不再報錯了.

3. 登入WAC伺服器, 在如下的位置找到ULS日誌:

C:\ProgramData\Microsoft\OfficeWebApps\Data\Logs\ULS

發現如下的報錯:

06/05/2013 23:38:56.21    w3wp.exe (0x1780)    0x2130    Office Web Apps    WAC Hosting Interaction    adhrj    Monitorable    HttpRequestAsync (WOPICheckFile,WACSERVER), request failure [HttpResponseCode:Forbidden, HttpResponseCodeDescription:Forbidden, url:http://sp2013-ca/_vti_bin/wopi.ashx/files/ee46dad3597f414b91d547007d786394?access_token=REDACTED_1056&access_token_ttl=1370536736053]    9bc1abde-e31f-4ec4-9bbc-741b8a169ac6
06/05/2013 23:38:56.21    w3wp.exe (0x1780)    0x258C    Office Web Apps    WAC Hosting Interaction    agw2h    Unexpected    WOPI Check, non-200 return [code:Forbidden, url:http://sp2013-ca/_vti_bin/wopi.ashx/files/ee46dad3597f414b91d547007d786394]    9bc1abde-e31f-4ec4-9bbc-741b8a169ac6
06/05/2013 23:38:56.21    w3wp.exe (0x1780)    0x258C    Office Web Apps    WAC Hosting Interaction    adhsk    Unexpected    WOPI CheckFile: Catch-All Failure [exception:Microsoft.Office.Web.Common.EnvironmentAdapters.FileUnknownException: WOPI Check File     at Microsoft.Office.Web.Apps.Common.WopiDocument.CheckWopiFile()]    9bc1abde-e31f-4ec4-9bbc-741b8a169ac6
06/05/2013 23:38:56.21    w3wp.exe (0x1780)    0x258C    Services Infrastructure    Services Infrastructure Logging    ai94t    Unexpected    FileUnknownException while loading the app. [FileSourceId: -1088102096] [ClusterId: 0] [ExtraErrorInfo: ]    9bc1abde-e31f-4ec4-9bbc-741b8a169ac6
06/05/2013 23:44:27.28    w3wp.exe (0x2BC4)    0x1DC4    ULS Logging    Unified Logging Service    b8fx    High    ULS Init Completed (w3wp.exe, uls.native.dll)  

4. 谷歌這條報錯, 發現可能跟AllowOAuthOverHttp的設定有關. 於是follow這篇文章的步驟, 配置AllowOAuthOverHttp.

使用的命令如下:

(Get-SPSecurityTokenServiceConfig).AllowOAuthOverHttp

$config = (Get-SPSecurityTokenServiceConfig)

$config.AllowOAuthOverHttp = $true

$config.Update()

(Get-SPSecurityTokenServiceConfig).AllowOAuthOverHttp

配置之後, 問題解決!

有圖有真相.

image

參考資料

========================

SharePoint 2013 Office Web Apps Problem - Unable to Open/View/Edit

http://social.technet.microsoft.com/Forums/en-US/sharepointgeneral/thread/f7be5f88-8c98-464e-8596-60956b5e98fd/

Configure SharePoint 2013 to use Office Web Apps

http://technet.microsoft.com/en-us/library/ff431687.aspx

相關文章