I no longer work at Microsoft, so please don't bother leaving a comment here or trying to contact me through my MSDN blog.
You can find my new blog at http://www.technologytoolbox.com/blog/jjameson. My new site also provides copies of all posts from my MSDN blog.
In the current sprint of the project I'm working on, we are deploying Office Web Apps to support an enterprise collaboration platform based on SharePoint Server 2010.
While creating the installation guide for this sprint, I used the following TechNet article as a reference for the section on installing and configuring Office Web Apps:
While the above article includes most of the steps you need to perform when deploying Office Web Apps on SharePoint 2010, it currently seems to be lacking a few important pieces (at least based upon my experience):
These steps are performed after completing the deployment steps in the above TechNet article.
For the remainder of this post, imagine that we are installing Office Web Apps on the extranet site for Fabrikam Technologies (http://extranet.fabrikam.com) and we want to provide the ability for Fabrikam employees and its partners to collaborate on documents created in Microsoft Word, Excel, and PowerPoint.
Assume we have created a new Web application, configured it for claims-based authentication, and deployed Office Web Apps by following the steps in the aforementioned TechNet article.
The relevant service accounts for the Fabrikam extranet site are listed in the following table.
In order to resolve a few issues with the deployment and ensure it conforms to recommended best practices, we need to perform some additional configuration steps.
When the Excel Services Application is created, a default trusted location is automatically configured (http://) for all content on the SharePoint farm. This default trusted location enables any file to be loaded from the SharePoint farm into Excel Services. However, this default trusted location does not support HTTPS (https://) and therefore results in the following error when attempting to access an Excel workbook using a secured connection:
This workbook cannot be opened because it is not stored in an Excel Services Application trusted location.
Use the following procedure to change the default trusted location to support HTTPS.
Important Skip this section for environments that are not configured with SSL certificates (e.g. development environments).
Note Since users of the Fabrikam extranet site are automatically redirected from http:// to https:// during sign in (via the Claims Login Form Web Part), it is not expected that Excel Services will be used over HTTP (only HTTPS). If it is necessary to support both HTTP and HTTPS, then a separate trusted file location will need to be configured.
By default, when you install Office Web Apps, the cache available to render documents is 100 GB and the cache expiration period is 30 days. The cached content for Office Web Apps is stored in a SharePoint content database.
It is recommended to isolate the content database used for the Office Web Apps cache, so that cached files do not contribute to size of the "main" content database(s) for the Web application. Also note that anytime you create a new SharePoint content database, it is recommended to expand the initial database files (at least in a production environment).
Important You must start a new instance of the SharePoint 2010 Management Shell after installing the Office Web Apps in order to use the new PowerShell cmdlets (e.g. Set-SPOfficeWebAppsCache). Also note that you may need to wait a few minutes (after installing Office Web Apps or rebuilding the Web application) before performing the following procedure (for the SharePoint timer job to configure the cache on the site collection before moving it to a separate content database).
You must start a new instance of the SharePoint 2010 Management Shell after installing the Office Web Apps in order to use the new PowerShell cmdlets (e.g. Set-SPOfficeWebAppsCache).
Also note that you may need to wait a few minutes (after installing Office Web Apps or rebuilding the Web application) before performing the following procedure (for the SharePoint timer job to configure the cache on the site collection before moving it to a separate content database).
The following procedures are used to reduce the Office Web Apps cache size to 30 GB, move the cache to a new content database, and expand the corresponding database files.
$ErrorActionPreference = "Stop" Add-PSSnapin Microsoft.SharePoint.PowerShell -EA 0 function ConfigureOfficeWebAppsCache( [string] $webAppUrl, [int] $cacheSizeInGigabytes, [int] $expirationPeriodInDays, [string] $cacheDatabaseName) { Write-Host ("Configuring Office Web Apps cache for Web application" ` + " ($webAppUrl)...") Write-Debug "cacheSizeInGigabytes: $cacheSizeInGigabytes" Write-Debug "expirationPeriodInDays: $expirationPeriodInDays" Write-Debug "cacheDatabaseName: $cacheDatabaseName" $cacheSizeInBytes = $cacheSizeInGigabytes * 1024 * 1024 * 1024 $webApp = Get-SPWebApplication –Identity $webAppUrl -Debug:$false $webApp | Set-SPOfficeWebAppsCache ` -ExpirationPeriodInDays $expirationPeriodInDays ` -MaxSizeInBytes $cacheSizeInBytes -Debug:$false $cacheDatabase = Get-SPContentDatabase $cacheDatabaseName -Debug:$false -EA 0 if ($cacheDatabase -eq $null) { $cacheDatabase = New-SPContentDatabase -Name $cacheDatabaseName ` -WebApplication $webApp -Debug:$false } Get-SPOfficeWebAppsCache -WebApplication $webapp -Debug:$false | Move-SPSite -DestinationDatabase $cacheDatabase -Confirm:$false ` -Debug:$false Write-Host "Restricting the cache database to a single site collection..." $database = Get-SPContentDatabase $cacheDatabase $database.MaximumSiteCount = 1 $database.WarningSiteCount = 0 $database.Update() Write-Host -Fore Green ("Successfully configured Office Web Apps cache for" ` + " Web application ($webAppUrl).") } function Main() { $webAppUrl = "http://extranet.fabrikam.com" $cacheSizeInGigabytes = 20 $expirationPeriodInDays = 30 $cacheDatabaseName = "OfficeWebAppsCache" ConfigureOfficeWebAppsCache $webAppUrl $cacheSizeInGigabytes ` $expirationPeriodInDays $cacheDatabaseName } Main
The following SQL statements can be used as an alternative to setting the sizes through the Database Properties dialog:
USE [master] GO ALTER DATABASE [OfficeWebAppsCache] MODIFY FILE( NAME = N'OfficeWebAppsCache' , SIZE = 10240000KB , FILEGROWTH = 512000KB) GO ALTER DATABASE [OfficeWebAppsCache] MODIFY FILE( NAME = N'OfficeWebAppsCache_log' , SIZE = 409600KB , MAXSIZE = 4096000KB) GO
Since the service account used to run the Office Web Apps service applications is different from the account used to run the application pool for the Web application, it is necessary to explicitly grant access to all of the content databases used by the Web application.
$webApp = Get-SPWebApplication "http://extranet.fabrikam.com" $webApp.GrantAccessToProcessIdentity("EXTRANET\svc-spserviceapp")