Sunday, 30 May 2010

Things to watch for when installing Office Web Apps

A few notes to pass on from my recent experience of installing Office Web Apps in SharePoint 2010:

1) I used the following PowerShell script to set up the Service Applications and associated proxies:

$AppPool = Get-SPServiceApplicationPool -Identity "SharePoint Service Applications Default"
New-SPWordViewingServiceApplication –Name "Word Viewing Service Application" –ApplicationPool $AppPool
$WdViewSA = Get-SpServiceApplication -Name "Word Viewing Service Application"
New-SPWordViewingServiceApplicationProxy –Name "Word Viewing Service Application Proxy" -URI $WdViewSA.Uri.AbsoluteUri
New-SPPowerPointServiceApplication –Name "PowerPoint Service Application" –ApplicationPool $AppPool
New-SPPowerPointServiceApplicationProxy –Name "PowerPoint Service Application Proxy" -ServiceApplication "PowerPoint Service Application"
New-SPExcelServiceApplication -Name "Excel Services Application" -ApplicationPool $AppPool

2) After creating the SA's, I started the Word Viewing, Excel Services, and PowerPoint services from the "Services on Server" option in Central Admin (I know I could have also done this in PowerShell, but it is just as straight forward from the UI!)

3) I was getting errors when trying to load any type of document in Office Web Apps so I checked the Event logs. I found Event 3760 which advised me that my service account for the SA application pool failed to logon to the SharePoint content database. I had a quick look around, but couldn't find anything concrete on what permissions the service account needed in SQL, so I gave it datareader and datawriter, ran an IISRESET, and tried again - same errors.

However, this time the event log reported Error 5214, telling me that I need to assign EXECUTE permissions to the SA application pool service account for the content database. To accomplish this, I created a db_executor role on each content database using the following SQL script:

CREATE ROLE db_executor
GRANT EXECUTE TO db_executor

I then opened up the properties of the SA application pool account in the Logins section of SQL Management Studio and assigned the db_executor role on each content database.