Thursday, May 9, 2019

Advantages and Limitations of using Office Online in SharePoint and OneDrive

One of the biggest draws of SharePoint Online and Office 365 is the ability to access the files anytime, anywhere. An added benefit, that in my opinion is somewhat of a revolution in collaboration world, is the ability to open and edit documents in Word, Excel and PowerPoint right in the browser. That means that you can work with those file types without having to have desktop version of MS Office installed on the computer. In this blog post I would like to explain advantages and limitations of using Office Online in SharePoint and OneDrive.

How to open and edit documents in the browser (using Office Online)

  1. To open the document in the browser, just click on any Word, Excel or PowerPoint file – by default, the file will open using Office Online (in the browser). Screenshot below shows an example of a Word document, opened in the browser, though same exact behavior applies to Excel and PowerPoint as well.officeonline1
  2. To Edit the document in the browser, just click on Edit Document dropdown and choose Edit in Browser (you can also open the document in native Word application if you so desire)officeonline2
  3. Word Online edting capabilities will now be exposed, and you can make changes to Word Document, just like in the installed version of the softwareofficeonline3
  4. Another way (shortcut) to quickly edit MS Office files is by right clicking on the file from within SharePoint and OneDrive and choosing Open > Open in Word Online from the menuofficeonline4

Advantages of opening and editing documents in the browser

  1. It is FREE. Office Online is included in all Office 365 Business/Enterprise plans, and you don't need to buy MS Office desktop license for it to work
  2. Simple sharing. It is easier to share Office Online documents as there is a Share button available in the upper right-hand cornerofficeonline5
  3. Quick Editing. Great option when you want to make quick changes to the document – files open up quicker than using the installed version of the software
  4. AutoSave. Office Online does not have a Save button – all changes are autosaved. So if you make a change and then close the browser – no worries – all changes are saved automatically.
  5. Does not require MS Office to be installed on PC to work. Since Office Online does not require Word, Excel or PowerPoint to be installed on the computer – this option is great when you need to access files in SharePoint and OneDrive from computer that does not happen to have this software installed (i.e. connecting remotely from hotel's computer)
  6. Supports PDF.  In addition to Word, Excel, PowerPoint, Office Online can also open PDF documents right in the browser. Please note that it does not support Edit capability for PDF files. For that, you would need an Adobe Acrobat software.

Limitations of opening and editing documents in the browser

  1. Only works in SharePoint and OneDrive. In order to open and edit MS Office documents in the browser (using Office Online) the documents have to reside in either SharePoint or OneDrive. They cannot reside on a computer or file share (network drive). This is by design, not so much of a limitation, but you would be surprised how many users question this.
  2. Limited functionality. Word Online, Excel Online and PowerPoint Online are not fully-installed applications on your PC. They are stripped-down (lite) versions of the corresponding desktop applications and do not have the full functionality you have on your PC. As such, they are meant for "lite" editing, and are not meant as a replacement for the desktop software.
  3. Limited file support. Office Online only works with the following file formats: .docx, .xlsx, .pptx files and PDF. Note the "x" at the end of MS Office file extensions. That means only latest MS Office files are supported (see next limitation).officeonline7
  4. Requires conversion for older MS Office files. Related to the point above – if your Word, Excel, PowerPoint files have been saved using older versions of the software (i.e., Word 97 or Excel 2003), they need to be saved (converted) to the new file format (from .doc to .docx). If you try to edit older version of the file in the browser, you will get a conversion request message (once you click Convert, the file will be converted to the new file format on the fly (from .doc to .docx)officeonline6
  5. Does not support CSV files. In case you need to edit CSV (comma delimited or comma-separated values) file, you will need to use the desktop version of Excel. CSV files cannot be viewed or edited in Office online
  6. Does not support password-protected files. If your file has been encrypted (saved) with the password, Office Online will prompt you to open it using the desktop version of the applicationofficeonline8
  7. File Size Limitation. If you have large files (>10MB in size), you will be prompted to open the file in the native (desktop version) of the Office. For example, below is a message you get when you try to open an Excel workbook larger than 10MB in size. Here is a Microsoft article that talks about this limitation further.Excel Online Error Message
  8. Certain SmartArt shapes are not supported. If you are using SmartArt shapes to draw charts and diagrams in your Word, Excel or PowerPoint, please note that some shapes are not supported. If Office Online runs into the issue – it will prompt you to open the file in native (desktop) version of the applicationofficeonline9officeonline10
  9. Can't run macros in Office Online. You can still access the documents with macros using Office Online, but to run macros, you will need the desktop version of the applications
  10. More limitations exist. For complete list of features that are not supported in Office Online, reference this comparison chart, courtesy of Microsoft.

How to disable Office Online (ability to open and edit Word, Excel, PowerPoint in the browser)

The default behavior for opening Office files in SharePoint when you click on them is via Office Online (via browser) and not via the native, desktop application. You can change that behavior though, if you wish.

Option 1: Disable Office Online (Browser Mode) for a Document Library

  1. Go to the library where you want to change the browser behavior. Click on Gear Icon > Library Settingsofficeonline11
  2. Choose Advanced Settingsofficeonline12
  3. Under Opening Documents in the Browser, choose Open in the client application button. Click OKofficeonline13

Option 2: Disable Office Online (Browser Mode) globally

  1. Go the root of the site collection (the very top site)
  2. Go to Gear Icon > Site Settingsofficeonline14
  3. Under Site Collection Administration, choose Site collection featuresofficeonline15
  4. Scroll down to Open Documents in Client Applications by Default. Click on Activate. Please note that this will alter the behavior for the whole site collection (all document libraries) at once.officeonline16
  5. If you have multiple site collections in your environment, you will need to repeat above steps for all of them

Though I have provided above instructions for your reference, I strongly discourage you from implementing them. Office Online provides a great, modern and convenient way to work with the files and you should really embrace it and take advantage of it and not revert to the way you worked with the documents in 1990's.

In Summary (Fine Print)

Ability to open and edit Office documents in the browser (via Word Online, Excel Online and PowerPoint Online) provides an awesome value and an additional mode for collaboration to SharePoint and OneDrive users.

One important thing to note is that…

Office Online is not a replacement for desktop Office applications, like Word, Excel and PowerPoint.

Office Online is meant to be complimentary to desktop software, not a an alternative or a complete replacement. If you are trying to save on licenses, please don't do it. You will not be able to get by on browser versions of the software alone due to many limitations listed above. I worked with several clients who migrated to SharePoint Online and thought they could save few bucks by purchasing cheaper licenses that did not include Office desktop suite and let's just say I could be rich if I made bets with them at the beginning of the project.





Tuesday, August 21, 2018

Office Web Apps 2013 – Increase Excel Workbook Size from the 10 MB Limit

If you were ever greeted by a message similar to the following:

"Wow, that's a big workbook. Unfortunately, we can't open a workbook larger than 10 MB.

You'll need to open this in Excel."

By default Excel Web App is set to a max size of 10 MB, here are my findings for other Office Web Apps 2013 documents:

  • Word Docs (no preset/published size limits, however, it is limited by file upload size configured on the SharePoint web application for up to 2GB)
  • PowerPoint  (no preset/published size limits, however, it is limited by file upload size configured on the SharePoint web application for up to 2GB)
  • Excel Workbooks (Set by default to 10mb size limit, however it can be increased to file upload size configured on the SharePoint web application for up to 2GB)
  • OneNotes  (no preset/published size limits, however, it is limited by file upload size configuredon the SharePoint web application for up to 2GB)

 

The workbook size is controlled by a property ExcelWorkbookSizeMax, to get the current value of this property

Log onto the Office Web Apps 2013 Server > Open PowerShell and type

Get-OfficeWebAppsFarm

To change this value from 10 MB to lest say 50 MB, just execute the following in PowerShell

Set-OfficeWebAppsFarm -ExcelWorkbookSizeMax 50

 

And there you have it, happy SharePointing !!

 

 Ref: https://blogs.technet.microsoft.com/sammykailini/2014/06/25/office-web-apps-2013-increase-excel-workbook-size-from-the-10-mb-limit/

 

Wednesday, November 29, 2017

CREATING HOST-NAMED SITE COLLECTIONS IN SHAREPOINT 2013

 

Host-Named Site Collection (HNSC) is actually a means to have a separate DNS for each site collection rather than having all the site collections follow the URL of the web application (path-based site collections).

Host-named site collections are the preferred method to deploy sites in SharePoint 2013 and many features (like Apps) are optimized for HNSC.

For instance if I want to create 3 site collections, I can now have dedicated URLS :

o   http://portal.contoso.com

o   http://portal.contoso.com/teams/SPGovernance

o   http://portal.contoso.com/projects/SPPoc

Microsoft recommends this by default and makes use of it in Office 365; as far as I know all site collections we create in Office 365 are Host-Named Site Collections (HSNC). It is fully tested by millions of customers every day : –)

o   The main reason for that is that HNSC make your farm design simpler to design, to setup and to operate.

o   Another reason is that since resources are not used to support multiple application pools and web applications, the farm will be more stable.

o   …and another obvious reason is that since less/no custom code (that can potentially harm the farm) is used in SharePoint 2013, there is also less risk that a single application pool get corrupted. In O365, only Apps or sandbox code (deprecated) is tolerated.

A SharePoint 2013 KISS design (Keep it Simple, Stupid) today means : 1 farm, 1 web app, HNSC and 1 zone.

o   1 farm : I still have to find real projects where my custom needs several farms.

o   1 web app : even the MySites can be hosted with other SharePoint Sites

o   1 zone :You can implement multiple authentication providers on a single zone but you need at least the Windows Authentication (NTLM) provider on the default zone (for the crawler, more details later).

Host Name Site collections are hosted in web applications that don’t have host headers.

ok hands-on now :

Step 1. Create a hosting web application without any host header and preferably on port 80.

This means that we will now avoid host header binding in IIS and responsible for resolving the correct site for the address based upon the incoming request passed through IIS.You MUST avoid host header in the “host” web app.

Step 2. In this Web App, we have to create a “normal” site collection

 

Step 3. Create DNS entries

Let’s go to the DNS server and create a new A Host with the portal.contoso.comFQDN and pointing to the web front end

 

Step 4. Create the Host Named Site Collection http://portal.contoso.com

 

In SP2013, HSNC can only be created via the New-SPSite PowerShell command; the –HostHeaderWebApplication option specifies that we are creating an HSNC and provides the link to the corresponding webapplication.

Let’s type the following command:

New-SPSite ‘http://portal.contoso.com’ -HostHeaderWebApplication ‘http://eurosp/’ -Name ‘Portal’ -Description ‘Customer root’ -OwnerAlias ‘contoso\administrator’ -language 1033 -Template ‘STS#0’

 

 

Even if HNSC can only be created via PowerShell, they can be managed from Central Administration like other site collections. For instance, our newly created HSNC will show up in the Site Collection list (Central Admin) :

Step 5. Managed Path for HNSC

http://portal.contoso.com/teams/SPGovernance and http://portal.contoso.com/projects/SPPoc

(we can add more HNSC like a HNSC for the Search center, another one for the MySites,…)

Since there will be several sites collections under  http://portal.contoso.com/teams/  and http://portal.contoso.com/projects/ we have to rely on implicit Managed Path

Creating Managed path for HNSC can be done with the New-SPManagedPathPowershell command.

Let’s type :

New-SPManagedPath ‘teams’ –Hostheader

New-SPManagedPath ‘projects’ –Hostheader

 

Step 6. Creating Hosted-Named Site Collections

let’s create our 2 site collections:

New-SPSite ‘http://portal.contoso.com/teams/SPGovernance’ -HostHeaderWebApplication ‘http://eurosp/’ -Name ‘SharePoint Governance team’ -Description ‘SP governance team’ -OwnerAlias ‘contoso\administrator’ -language 1033 -Template ‘STS#0’

New-SPSite ‘http://portal.contoso.com/projects/SPPoc’ -HostHeaderWebApplication ‘http://eurosp/’ -Name ‘SharePoint Proof of concept’ -Description ‘SharePoint Proof of concept’ -OwnerAlias ‘contoso\administrator’ -language 1033 -Template ‘STS#0’

Now, 3 important remarks :

1.     The maximum number of Managed paths for HNSC : 20 for the whole farm !  (yes only 20!)

2.     You cannot list HNSC with managed Path in Central Administration.

3.     The equivalent of alternate access mapping cannot be applied to HSNC with Managed path as described below

Step 7. URL Mapping and Hosted-Named Site Collections

if for instance, we want the url http://contosointranet to be mapped to an existing url like http://portal.contoso.com but in a different zone, we can use something similar to what Alternate Access mapping provides (but focused on Hosted-Named site collections) :

Url Mapping.

Here again, we need to rely on PowerShell :

set-SPSiteUrl

Let’s create a contosointranet.contoso.com DNS entry

 

Type :

Set-SPSiteUrl (Get-SPSite ‘http://portal.contoso.com/’) -Url ‘http://contosointranet.contoso.com’ -Zone Intranet

…and the portal can be reached via http://portal.contoso.com or via http://contosointranet.contoso.com

As mentioned before, url mapping cannot be applied to HSNC with managed path : for instance we cannot map http://governance to http://portal.contoso.com/teams/spgovernance

Since we are mentioning zones, don’t forget that the default zone url must be always used by the crawler (and with windows authentication, not claim authentication); this is not clearly documented in the TechNet except here. if you don’t do this you might face issues with the Query search results (operated from from other zones).

 

Thursday, November 2, 2017

SharePoint 2013 Distributed Cache service

This post is meant to give SharePoint Administrators an deeper look into the Distributed Cache along with some links to other resources on the internet.

Background
SharePoint 2013 uses the AppFabric (Caching) by Microsoft. Read here for a background on AppFabric. AppFabric Caching stores serialised managed objects in a ‘cache cluster’. The cache cluster consists of one or more machines (Cache Hosts) that pool their available physical memory. This pooled memory is presented  and used by SharePoint as a single source of caching memory.

How is it used in SharePoint
SharePoint uses the Distributed Cache to store data for very fast retrieval across all entities. The Distributed Cache service provides in-memory caching services to several features in SharePoint Server 2013. Some of the features that use the Distributed Cache service include:
· Newsfeeds
· Authentication
· OneNote client access
· Security Trimming
· Page load performance

In SharePoint Server 2013, there are several caches that exist, all of which depend on the Distributed Cache service.
Different caches that depend on the Distributed Cache service as indicated in the following table:

Name

Cache name

Login Token Cache

DistributedLogonTokenCache

Feed Cache

DistributedActivityFeedCache

This cache stores activities and conversations for use by the feeds on a user’s My Site.

Last Modified Time Cache

DistributedActivityFeedLMTCache

This cache stores time stamp information for all Feed Cache entities

OneNote Throttling

DistributedBouncerCache

Access Cache

DistributedAccessCache

Search Query Web Part

DistributedSearchCache

Security Trimming Cache

DistributedSecurityTrimmingCache

App Token Cache

DistributedServerToAppServerAccessTokenCache

View State Cache

DistributedViewStateCache

Default Cache

DistributedDefaultCache

This cache can be used by any feature.

Source: http://technet.microsoft.com/en-us/library/jj219700.aspx

Installation
AppFabric is a required component for SharePoint 2013 and is installed as part of the prerequisite installer. Thus each server automatically becomes part of the ‘cache cluster’. There is nothing to configure here as SharePoint does this automatically.

Farm Architecture – modes
Here is some terminology that will be useful when talking SharePoint architecture and topology:
There are two ‘modes’ for Distributed Cache – A collocated mode or a dedicated mode. The Distributed Cache is started and run on all WFE and APP servers by default. If you have over 10000 users, you should look into a dedicated server (dedicated mode) Distributed Cache. Dedicated Mode simply means all other services are turned off and more memory is allocated to the Distributed Cache.

Farm design
While designing your topology, could consider starting the Distributed Cache service on your WFE servers (for redundancy) and stop the Distributed Cache Service on the APP server if you are concerned with ‘overhead’ caused by all the other services running on the APP server. You can consider a scale up plan if you are low on resources or scale out (by starting the Distributed Cache on other servers in the farm).
Finally it boils down to memory allocation at the end of the day. By default, the Distributed memory allocation size defaults to a value of 10 percent of total physical memory when SharePoint Server 2013 installs. You can change the memory allocation with the Update-SPDistributedCacheSize cmdlet.

Here is a link that may help on the ‘right approach’: http://technet.microsoft.com/library/jj219572%28office.15%29.aspx (note the ‘Capacity planning for the Distributed Cache service’ section).

Management
The Distributed Cache service can be stopped or started via the Central Administration or via PowerShell.

Servers can be added or removed from the ‘Cache cluster’ too. When removing the server, the Distributed Cache service is stopped, then unregistered from the server. Unregistering the Distributed Cache service means that you will not see the Distributed Cache service listed on the Services on Server page in Central Administration. Adding a server means that you will see the Distributed Cache service listed on Services on Server page in Central Administration.

To add a server and start the service in PowerShell: Add-SPDistributedCacheServiceInstance

To remove a server and stop the service in PowerShell:
Remove-SPDistributedCacheServiceInstance

To stop (not remove) the Distributed Cache service by using Central Administration: In Central Administration, click Application Management. In Service Applications, click Manage Services on Server. On the Services on Server page, locate the Distributed Cache service. If the Distributed Cache service is started and you want to stop the service, under Action, click Stop.

To stop (not remove) the Distributed Cache service by using Windows PowerShell: At the Windows PowerShell command prompt, run the following command: $instanceName =”SPDistributedCacheService Name=AppFabricCachingService” $serviceInstance = Get-SPServiceInstance | ? {($_.service.tostring()) -eq $instanceName -and ($_.server.name) -eq $env:computername} $serviceInstance.Unprovision()

To check existing memory allocation of the Distributed Cache Host:
Use-CacheCluster
Get-AFCacheHostConfiguration -ComputerName ComputerName -CachePort “22233”

To reconfigure the cache size of the Distributed Cache Service:
Update-SPDistributedCacheSize -CacheSizeInMB CacheSize


Firewall configuration considerations

The Distributed Cache service uses the following communication ports:
22233
22234
22235
22236

Monitoring
The Distributed Cache can be monitored using below performance counters in Perfmon:


SharePoint Distributed Cache Counters
Cache Data Transferred Per Sec
Cache Hit Count
Cache Hit Ratio
Cache Miss Count
Cache Read Requests per sec
Cache Write Requests per sec
Total Cache Read Requests
Total Cache Write Requests


Additionally, there are three groups of ‘AppFabric’ counters available. Note there are multiple instances – indicating the different caches present in the Distributed Cache.
AppFabric Caching:Cache
AppFabric Caching:Host
AppFabric Caching:Secondary Host

Important Distributed Cache resource
Manage the Distributed Cache service in SharePoint Server 2013
Plan for feeds and the Distributed Cache service in SharePoint Server 2013

The above link shows how you can:

  • Change the memory allocation of the Distributed Cache service
  • Add or remove a server in a Distributed Cache cluster
  • Perform a graceful shutdown of the Distributed Cache service
  • Change the service account
  • Repair a cache host