Saturday, August 27, 2011

Installing Office Web Apps

I have a single server farm that I use for demos and need Office Web Apps on it. The instructions can be found on TechNet: Deploy Office Web Apps (Installed on SharePoint 2010 Products) and are fairly straightforward. The only issue is that it is not supported on a domain controller which is the demo environment I have.

When I try to load any Word document, I get an error: Word Web App cannot open this document for viewing because of an unexpected error. To view this document, open it in Microsoft Word. There is some Error Id that I can't seem to correlate to anything.

Fortunately, there is a blog entry by Jie Li on Installation Notice for SharePoint 2010 Public Beta that describes steps to make this work:

Step 10 applies because I am running SharePoint on a domain controller. Here is the script from the blog. 
$acl = Get-Acl HKLM:\System\CurrentControlSet\Control\ComputerName
$person = [System.Security.Principal.NTAccount]"Users"
$access = [System.Security.AccessControl.RegistryRights]::FullControl
$inheritance = [System.Security.AccessControl.InheritanceFlags]"ContainerInherit, ObjectInherit"
$propagation = [System.Security.AccessControl.PropagationFlags]::None
$type = [System.Security.AccessControl.AccessControlType]::Allow
$rule = New-Object System.Security.AccessControl.RegistryAccessRule($person, $access, $inheritance, $propagation, $type)
$acl.AddAccessRule($rule)
Set-Acl HKLM:\System\CurrentControlSet\Control\ComputerName $acl
From what I can tell, all this is doing is allowing Full Control for all authenticated users on the HKLM:\System\CurrentControlSet\Control\ComputerName registry key. I'm not sure what this has to do with things, but oh well ...

Step 11 has some Powershell script for that appears to disable Sandboxed Solutions for the Office Web Apps service applications. Once again, I don't really know why, but it appears to work.
$e = Get-SPServiceApplication | where {$_.TypeName.Equals("Word Viewing Service Application")}
$e.WordServerIsSandboxed = $false

For the following commands, you will need to enter "Y" to confirm execution of each command
Get-SPPowerPointServiceApplication | Set-SPPowerPointServiceApplication -EnableSandboxedViewing $false
Get-SPPowerPointServiceApplication | Set-SPPowerPointServiceApplication -EnableSandboxedEditing $false

Then edit C:\Windows\system32\inetsrv\config\applicationHost.config and add the following line at the end of the <dynamicTypes> element.
<add mimeType="application/zip" enabled="false" />

Finally, do an iisreset 

I don't really know why all of this works. It looks like all we are doing is enabling Sandboxed Solutions Architecture only then to disable it on the Office Web Apps solutions. I would like to if anybody can explain it.

No comments:

Post a Comment