February, 2011

  • Jie Li's GeekWorld

    Uninstall or Disable Office Web Apps?

    • 8 Comments

    Although there’s very small chance for people to decide to disable/uninstall Office Web Apps from their farm, sometimes this is still required, for example if customer has licensing issues.

    When Chris Givens was working on 10174 training course he noticed that the uninstall did not go smoothly as he thought. I was working with him and reviewing the content as the content owner from a Product Manager’s perspective, and got notified as well. However a lot of things happened afterwards so I didn’t have time to look at it until now.

    Here’re a few points you must remember when you want to uninstall Office Web Apps:

    • Uninstall Office Web Apps will remove the server from the SharePoint Farm. If you read the notification carefully when you click the uninstall button you will know this.
    • All web applications and sites created by SharePoint will be deleted from IIS.
    • You can rejoin the machine back to the Server Farm by psconfig with your farm passphrase.
    • You need to redeploy customizations to the server.
    • If this happens to be the server which hosts Central Administration, you need to rebuild the CA. This can be done through the Management Shell: New-SPCentralAdministration -Port xxxx -WindowsAuthProvider "NTLM"

    If you can tolerance server down time then maybe it’s fine for you. Otherwise the whole process are not that pleasant. So how about just disable it like this:http://technet.microsoft.com/en-us/library/ee837418.aspx ?

    To deactivate the Office Web Apps Feature on a single site collection by using Windows PowerShell

    Using Notepad, open a new text file and then copy and paste the following script into the file.

    $webAppsFeatureId = $(Get-SPFeature -limit all | where {$_.displayname -eq "OfficeWebApps"}).Id 
    $singleSiteCollection = Get-SPSite -Identity http://<site_name> 
    Disable-SPFeature $webAppsFeatureId -Url $singleSiteCollection.URL
    

    Hmm, in fact this will not completely disable the feature. You have to enable “Open in Client” feature as well, then all files can be opened in Office clients instead of the browser. However if you visit the server without Office client installed or using something like Safari/Chrome, you will still be redirected to the Office Web Apps page like WordViewer.aspx even you have deleted the service applications, stopped the related services.

    Why? Because the modification to the drop down menu and open behavior by Office Web Apps cannot be turned off using those ways. Of course, a full uninstall will work – but like what I listed above, it has many cons. Luckily this is not the end of the world. With a few hours work I identified the change made by Office Web Apps and confirmed with the product team. Here’s my findings:

    The reason why you can see those drop down menus with items like “Edit in Browser” is because the XML definition is changed. Take this one as an example:

    c:\program files\common files\microsoft shared\web server extensions\14\template\xml\serverfilesword.xml

    Content:

    <?xml version="1.0" encoding="utf-8" ?>
    <!-- Copyright (c) Microsoft Corporation. All rights reserved. -->
    <ServerFiles>
        <Mapping FileExtension="doc"  RedirectUrlTemplate= "/_layouts/WordViewer.aspx?id=|0" NoGetRedirect="TRUE" />
        <Mapping FileExtension="dot"  RedirectUrlTemplate= "/_layouts/WordViewer.aspx?id=|0" NoGetRedirect="TRUE" />
        <Mapping FileExtension="docx" RedirectUrlTemplate= "/_layouts/WordViewer.aspx?id=|0" NoGetRedirect="TRUE" CreateRedirectUrlTemplate= "/_layouts/CreateNewDocument.aspx?id=|0" />
        <Mapping FileExtension="docm" RedirectUrlTemplate= "/_layouts/WordViewer.aspx?id=|0" NoGetRedirect="TRUE" CreateRedirectUrlTemplate= "/_layouts/CreateNewDocument.aspx?id=|0" />
        <Mapping FileExtension="dotx" RedirectUrlTemplate= "/_layouts/WordViewer.aspx?id=|0" NoGetRedirect="TRUE" CreateRedirectUrlTemplate= "/_layouts/CreateNewDocument.aspx?id=|0" />
        <Mapping FileExtension="dotm" RedirectUrlTemplate= "/_layouts/WordViewer.aspx?id=|0" NoGetRedirect="TRUE" />
    </ServerFiles>

    The purpose of this file is to tell SharePoint that if it has such doc files within a doc lib, use the redirect url template to process it. So what we will do is to simply remove this file or comment out the section to make it looks like this:

    <?xml version="1.0" encoding="utf-8" ?>
    <!-- Copyright (c) Microsoft Corporation. All rights reserved. -->
    <ServerFiles>
    <!--
        <Mapping FileExtension="doc"  RedirectUrlTemplate= "/_layouts/WordViewer.aspx?id=|0" NoGetRedirect="TRUE" />
        <Mapping FileExtension="dot"  RedirectUrlTemplate= "/_layouts/WordViewer.aspx?id=|0" NoGetRedirect="TRUE" />
        <Mapping FileExtension="docx" RedirectUrlTemplate= "/_layouts/WordViewer.aspx?id=|0" NoGetRedirect="TRUE" CreateRedirectUrlTemplate= "/_layouts/CreateNewDocument.aspx?id=|0" />
        <Mapping FileExtension="docm" RedirectUrlTemplate= "/_layouts/WordViewer.aspx?id=|0" NoGetRedirect="TRUE" CreateRedirectUrlTemplate= "/_layouts/CreateNewDocument.aspx?id=|0" />
        <Mapping FileExtension="dotx" RedirectUrlTemplate= "/_layouts/WordViewer.aspx?id=|0" NoGetRedirect="TRUE" CreateRedirectUrlTemplate= "/_layouts/CreateNewDocument.aspx?id=|0" />
        <Mapping FileExtension="dotm" RedirectUrlTemplate= "/_layouts/WordViewer.aspx?id=|0" NoGetRedirect="TRUE" />
    -->
    </ServerFiles>

    Then do the same to serverfilespowerpoint.xml. Unless you are using standard CAL, there’s no need to touch Excel Services since it’s a part of Enterprise CAL and is not installed by Office Web Apps.

    Then combine this change with the disable of Office Web Apps feature and the enable of Open in Client feature, Office Web Apps can be disabled completely on the site collection from a user experience perspective. You can also stop the related services and service applications.

     

    Jie.

  • Jie Li's GeekWorld

    How to apply MS10-079 to a SharePoint farm with Office Web Apps enabled?

    • 0 Comments

    MS10-079 is a security bulletin about vulnerabilities in Word. If you read through the bulletin, you can find that it impacts Office Web Apps too. Sounds pretty clear? However, when I tried to apply it I was confused.

    Screenshot of the original page:

    snap0030

    Okay, the first one is KB2346411, and the second one is KB2345015. And it further stated in the bulletin that For Microsoft Office Web Apps, customers need to install both security update KB2346411 and security update KB2345015 to be protected from the vulnerabilities described in this bulletin. Fine. So apply KB2346411 – pretty straight forward, no restart or psconfig needs to be run. Then, apply KB2345015 – here comes the problem. You may see a strange dialogue show up like below:

    clip_image002

    Aha, an empty box with OK button. OK for what? Click…

    clip_image002[5]

    Huh?

    I didn’t install any other updates except KB2346411 for Office Web Apps. So now this is really confusing – if this so called “Security Update for Microsoft Word Web Application 2010” is try to apply a fix for Word Web App (Apparently they even made the product brand name wrong, but anyway, some times they even called SharePoint Foundation 2010 as Office SharePoint Foundation. They have no respect of our brand names), then it should update some files related with Word Web App, which I had never patched before. Background knowledge: CU fix does not include Office Web Apps. Now it tells me the update is already “installed” – this made me nervous about my system security. Is it patched? Or is this something wrong with that fix?

    After reading into the description of the KB article, it turns out the files it want to replace are the WDSRV.DLL related ones. This is Microsoft.Office.Word.Server in your GAC. Let me explain – this is not Word Web Apps at all – it is not even a part of Office Web Apps. Instead, this is Word Automation Services, which is used to convert word documents on SharePoint Server. Further explanation is here: http://msdn.microsoft.com/en-us/library/ee558830.aspx. This component is included in all SharePoint Server installation even without Office Web Apps installed. And this patch, is already included in December 2010 Cumulative Update so there’s no point to apply it if you have Dec CU already.

    Quick Summary: If you need to apply MS10-079 to a farm with Dec CU, the only thing needed is KB2346411.

     

    Jie.

Page 1 of 1 (2 items)