January 3, 2012 - 06:24, by Steven Van de Craen
Categories: SharePoint 2010, Excel Services, Office Web Applications
Recently a colleague wanted to display a with Excel Services rendered workbook inside a cross-domain iframe:
- Excel Services: http://intranet/_layouts/xlviewer.aspx?id=%2FShared%20Documents%2FBook1%2Exlsx&DefaultItemOpen=1
- Other domain web site with iframe: http://lux
But because Excel Services and Office Web Apps render a HTTP response header X-FRAME-OPTIONS: SAMEORIGIN this won’t work and you get “This content cannot be displayed in a frame”
Not used to seeing such a straight-forward error :)
I did a bit of investigating but couldn’t find an easy way to configure this through UI or Powershell, so I was left with the following options:
- Strip the header in a reverse proxy (between client and SharePoint server) like Apache or ForeFront
- Remove the header with development of a HttpModule
PermissiveXFrameHeader
I wrote up a quick HttpModule that can be activated by Web Application Feature and will remove the X-FRAME-OPTIONS header no questions asked.
You might want to adapt the code for additional checks on referrer, querystring, client, or similar for conditional removal of the header (see final note below).
Installation and activation
Download from here (Ventigrate Codeplex Repository)
Deploy the WSP (farm solution) to the SharePoint Farm
STSADM -o addsolution -filename Ventigrate.Shared.PermissiveXFrameHeader.wsp
STSADM -o deploysolution -name Ventigrate.Shared.PermissiveXFrameHeader.wsp -allowgacdeployment -immediate
Activate the Web Application Feature to the Web Application referred to in the iframe
Final note
The header was designed to protect against clickjacking. If you intend to use the above solution keep this in mind and plan for it accordingly.
January 4, 2011 - 10:51, by Steven Van de Craen
Categories: Office Web Applications, SharePoint Server 2010, SharePoint Foundation 2010, SharePoint 2010
Yesterday was my first working day of the new year and it didn’t start very well.
I decided to upgrade one of our internal servers from SharePoint Foundation 2010 to SharePoint Server 2010, in order to have InfoPath Forms Server and the like… This should be a breeze if you follow this article on MSDN: http://msdn.microsoft.com/en-us/library/cc262342.aspx, however…
Office Web Applications were causing the SharePoint Server 2010 installer to fail saying
“The install install in progress conflicts with a previous installed Microsoft Office 2010 Server Product”
Uninstalling from the Office Web Applications didn’t work, and others have reported this as well: http://social.technet.microsoft.com/Forums/en-US/sharepoint2010setup/thread/9f43f8ec-e461-4954-9f00-a16c413914fc
So I tried the removal tool and finally got rid of all Office Web Applications-related stuff.
After the upgrade I tried to reinstall Office Web Application, but that kept failing saying something about access denied to a registry key called “UNKNOWN\Components\E0710AF3C7227C73AB0C4696A199C218\1100000”
I tried the regular stuff like setting myself as owner, inheriting to all child objects, but that didn’t work. Using the RegASSASSIN tool from Malwarebytes first, and then setting myself as owner got the job done.
Finally I managed to install the Office Web Applications and all was well again :)
August 16, 2010 - 09:24, by Steven Van de Craen
Categories: Office Web Applications, Office 2010, SharePoint 2010, SharePoint Foundation 2010, SharePoint Server 2010
The Office Web Apps allow users without Microsoft Office installed to display or work on Word, Excel or PowerPoint files from the browser. It is a separate installation to your SharePoint Farm and controllable by two Site Collection Features:
When active it will render Office 2007/2010 file formats in the browser, without any requirement to a locally installed Office suite.
As you notice in the screen there’s no obvious way to create a new document, spreadsheet or presentation. So how would that work ?
The ‘New’ button on libraries has both functionalities; when a local installation of Office is found it will open up the corresponding application, else it will navigate to a page for creating a new file directly from the browser.
Word Web Application:
If you’re using a modified document template, the new document will be based on the modified template.
Excel Web Application:
If you’re using a modified spreadsheet template, the new document will NOT be based on that.
PowerPoint Web Application:
If you’re using a modified presentation template, the new presentation will be based on the modified template.
It’s a shame Excel behaves differently, but other than that it’s a really nice feature !