STEPS
01 - I created a website: site01.com
02 - I made a binding to OOS: New-SPWOPIBinding -ServerName "oos19.com"
03 - Everything worked and the documents began to open. Editing works.
Three months have passed...
04 - I created a website: site02.com
05 - The open document Online item has appeared on the site, but it does not work.
06 - I deleted the binding: Remove-SPWOPIBinding -All:$true
07 - I made a binding to OOS: New-SPWOPIBinding -ServerName "oos19.com"
08 - ...... but it does not work.
09 - I have cleared the configuration cache
if ($null -eq (Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue)) { Add-PSSnapin "Microsoft.SharePoint.PowerShell" }
$arrServers = Get-SPServer | Where-Object { $.Role -ne "Invalid" } | Select-Object -ExpandProperty Address
Write-Host "This script will reset the SharePoint config cache on all farm servers:"
$arrServers | Foreach-Object { Write-Host $ }
Write-Host "Press enter to start."
Read-Host
Invoke-Command -ComputerName $arrServers -ScriptBlock {
try {
Write-Host "$env:COMPUTERNAME - Stopping timer service"
Stop-Service SPTimerV4
# 2016 \15.0\ 2019 \16.0\
$ConfigDbId = [Guid](Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\16.0\Secure\ConfigDB' -Name Id).Id #Path to the '15 hive' ConfigDB in the registry
$CacheFolder = Join-Path -Path ([Environment]::GetFolderPath("CommonApplicationData")) -ChildPath "Microsoft\SharePoint\Config\$ConfigDbId"
Write-Host "$env:COMPUTERNAME - Clearing cache folder $CacheFolder"
Get-ChildItem "$CacheFolder*" -Filter *.xml | Remove-Item
Write-Host "$env:COMPUTERNAME - Resetting cache ini file"
$CacheIni = Get-Item "$CacheFolder\Cache.ini"
Set-Content -Path $CacheIni -Value "1"
}
finally {
Write-Host "$env:COMPUTERNAME - Starting timer service"
Start-Service SPTimerV4
}
}
10 - I deleted the binding: Remove-SPWOPIBinding -All:$true
11 - I made a binding to OOS: New-SPWOPIBinding -ServerName "oos19.com"
12 - As a result, OOS works only on the first site. It does not work on sites created later.