今天在搭建Office Web Apps Server并关联SharePoint2013后,遇到无法在SharePoint中使用OWA Preview Office file的情况,提示错误“Sorry,there was a problem and we can't open this document”。
经过排查是因为SharePoint Server中AllowOAuthOverHttp Setting状态为false,没有正确更新所致。
通过下面步骤解决此问题:
- Check当前SP Server的AllowOAuthOverHttp Setting的值是否正确,发现是false; 方法:Administrator方式打开SharePoint PowerShell,输入命令 (Get-SPSecurityTokenServiceConfig).AllowOAuthOverHttp
- 输入下面命令修改Setting值为True,并通过get确认状态已更新。
$config= (Get-SPSecurityTokenServiceConfig)
$config.AllowOAuthOverHttp= $true
$config.Update()
此时,打开SharePoint Library,preview Office file能够正常打开,问题解决。