SharePoint 2013 : Working with Chrome Control and Cross Domain Execution in Provider Hosted App

In the new SharePoint 2013 App model, the Apps can be hosted in one of the following hosting model: SharePoint Hosted (with in SharePoint Domain), Provided Hosted and Auto Hosted (Outside SharePoint Domain).

One of the biggest issue that we can see with Apps running outside SharePoint Domain is Branding, since these Apps has got separate Home or Landing Pages than SharePoint and does not follow Visual Paradigms like Navigation Menus, Back Link to Home Page and so on similar to SharePoint.

Intranet Users can feel disconnected with the App due to this huge gap in UI Experience.

In order to overcome this obvious issue SharePoint allows to import a very basic version of SharePoint 2013 Chrome into their Apps without apply the Custom CSS Styles manually by means of a Client Side Rendering Control called “Chrome Control”.

The functional implementation details of this control reside in “SP.UI.Controls.js” file located in the new “/_layouts/15” virtual directory or “Layouts” Folder in 15 Hive.

Hope up to this point you grasp a fair understanding in Chrome Control and now it is time to move on to see it in action.

In order to demonstrate this implementation of Chrome Control we will start with a Provider Hosted App as show in below steps:

Create a new SharePoint App Project by selecting “App for SharePoint” project template


Choose Hosting Model as “Provider-Hosted”


Choose “ASP.Net Web Forms Application” as template for provisioning the Remote Site


Specify the Certificate location, decrypting password and Issuer ID (This ID was generated while we configure the S2S Trust for Provider Hosted Apps)


Once the Project has been added to the solution it would look like as below:


I have added a dummy feature to force SharePoint to create an App Web for this App, though this is purely optional.


We can review the App Web using any SharePoint Object Browser, here I am using SharePoint Manager to lookout the same


Also notice that we have changed the Start Page for App to “ChromeCrossDomain.aspx” as highlighted below-


Allowing Read permission for the App in Site Collection Hosting it in AppManifest.xml


Also in the Remote Web Project we have Pages Folder which is containing pages for our App.


We have “ChromeCrossDomain.aspx” page residing inside this folder which will serve as Start Page for this App


Similarly we have Scripts folder which is holding all JavaScript Files in use by this App as shown below

Apart from standard JavaScript Files supporting JQuery, we also have two App specific custom JavaScript Files “ChromeLoader.js” & “CrossDomainExecutor.js” which is implementing the core of Chrome Control for this App


In the Start Page HTML –

Firstly we have to add the “Script” Tags to include custom Javascript Files

Then we need to add a “Div” Tag with id = “chrome_ctrl_container” (you can use any unique value as ID) at the top level as shown highlighted


Now if we explore the code in one of the Custom JS file “ChromeLoader.js”, we can see it as

Step 1 – “getParameterByName” is a helper function that can be utilized to read Query String Parameters from the incoming request

Step 2- Read the “SPHostUrl” Query String Parameter to get the handle on Host Web

Step 3- Load “SP.UI.Controls.js” file in context of Host Web and once loaded call “renderChrome” method

Step 4- Inside “renderChrome” method, we are preparing Object holding the Chrome Configuration Options

appIconUrl                –      Icon URL that we need to show at the top header of the App

appTitle                     –      Header Title for the App

appHelpPageUrl       –      Help Page Url for the App

settingsLinks            –      Links to be shown under settings menu

Step 5- “SP.UI.Controls.Navigation” method is used to load the Chrome Control inside the div with Id = “chrome_ctrl_container” along with settings applied based on the “options” object we created in Step 4

Step 6- Visible the Chrome Control and let the SharePoint UX rendering takes precedence over the App defaults


This is it for loading the Chrome Control in our custom App.

Now let see how we can enable Cross Domain Execution for this App.

If we investigate the other custom JS File “CrossDomainExecutor.js” we can notice the execution as follows-

Step 1- Getting “SPHostUrl” and “SPAppWebUrl” Query String Parameters using “getParameterByName” method as before. “SPHostUrl” provides the Url of Host Web where the App has been installed while “SPAppWebUrl” provided the Url of App Web which we got created during the App Installation (by means of Dummy Feature).

Step 2- Getting the reference of “SP.RequestExecutor.js” JS file in context of Host Web as earlier. “SP.RequestExecutor.js” is used to execute Cross Domain Calls to SharePoint i.e. the Call from SharePoint App (Domain 1) to SharePoint (Domain 2).

Step 3, 4, 5- Instantiating the context of App Web and instantiating the object of AppContextSite to get the handle on Host Web object. Once it is done rest of the things are simply applying JSOM operations

Step 6- Query Announcements List in Host Web and interface its records in the App Start Page


Before moving forward let’s have a look into the Announcements List to see what all items we have for query on App Start Page


We can see there are two items available to be displayed with in the App Start Page.

Build the Solution and deploy it

Trust the Security Certificate and move on


Trust the App when asked to and move on


Provide Credentials for Authentication


And we are all set with final outcome which can we analyzed as below:

Step 1- Showing the App URL ensuring we are looking at the Start Page of the App

Step 2- Showing App Site Header Image and Title fetched by Chrome Control from within the Host Web Context

Step 3- Showing Settings Links added during configuring options for the Chrome Control

Step 4- Showing Announcement List Items queried from the Host Web executed by Cross Domain Request to SharePoint


So it is evident that by making use of Chrome Control we could save significant efforts in maintaining Synch between SharePoint and App UI Designs.

Hope you find it helpful.

SharePoint Developer Tools – Get Your Gears

There are quite a number of Must to Have developer tools that every SharePoint Developer must have in its arsenal in order to boost its own Productivity while developing solutions on SharePoint Platform.

Few of the tools which are my personal favorites also are listed below:

CAML Designer 2013

CAML Designer can generate the CAML Query Stubs based on the inputs provided by the developer and can quickly give a handle on even complex query formations.

It is not just about the Formation of Queries but also offers code Transition from actual CAML Query to

  • Corresponding Server Side Object Model Code
  • Corresponding Managed Client Side Object Model Code
  • Corresponding JSOM & REST API Calls
  • Corresponding PowerShell Code


Download Path:

SharePoint Manager 2013

SharePoint Manager has got quite a simple and intuitive interface which allows you to quickly and easily navigate down the farm and investigate settings, properties, schema XML and so on. Most of the things in your SharePoint environment can be investigated from this tool.

This tool allows you to quickly navigate the Site Hierarchy and objects, and you can also get a quick handle on Schema of List, Fields and on object properties like Object GUIDs, Object Titles and so on.


Download Path:

ULS Viewer

ULS Viewer allows you to look into the SharePoint ULS Logs in real time by parsing the Logs. The information (Correlation ID, Date Time Stamp, Event Source Process and so on )exposed by this tool is really useful for productive debugging capabilities.


With the evolution of SharePoint 2013 Developer Dashboard also includes these capabilities of reading & parsing ULS logs. Developer Dashboard contains a separate tab by the name “ULS” where we can see the ULS log entries.


Download Path:


CSK Dev is a Visual Studio extension which adds a bunch of new Project items for SharePoint Projects that are really helpful in increasing productivity of a developer.

Extension Project Items included

  • WCF Service SPI template
  • Contextual Web Part SPI template
  • Branding SPI Template
  • ASHX SPI template
  • Upgrade Solution Step
  • Restart IIS Step
  • Copy To SharePoint Root Step

And many more…



Download Path:

Color Palette Tool for Branding

Color Palette allows you create a composed looks for SharePoint 2013.


Download Path:

SharePoint 2013 Search Tool

SharePoint Search Tool allows to you create and test SharePoint Search Keyword Query backed up by SharePoint REST API paradigm. It also allows you to analyze the Query Stats and adjust them as per the required output.


Download Path:


Fiddler is a Web Proxy that allows to Debug Web Traffic, do Performance Testing, HTTP/HTTPs Traffic Recording, Security Testing and so on.

The use of Fiddler becomes utmost necessary now with the evolution of SharePoint 2013 which is more focused on Development Strategies based on Client Side Scripting Technologies.


Download Path:

SPCAF – SharePoint Code Analysis Framework

SharePoint Code Analysis Framework helps to validate your custom SharePoint Solutions and Apps against Best Coding Practices prescribed the industry drawn by various industry standards.

This framework can be really helpful to let you verify if your custom solutions are Stable, Complying with Company Policies, Following Coding Best Practices, Well Designed and Maintainable and much more.


Download Path:

.NET Reflector from Red Gate

.Net Reflector is one of the best tools I have ever used for understanding code of Third Party DLLs for which I even did not had the Source Code.

Reflector allows you to look into the DLLs to see the code encapsulating inside it to understand its functioning.


Download Path:

PowerShell Tools for Visual Studio

This is an excellent Visual Studio Extensions for PowerShell which enables code intellisence for PowerShell Scripts within Visual Studio Editor.


Download Path:


This tool is specially designed to enhance the productivity while working with SharePoint App.

This tool is best suited for pushing the code changes quickly to SharePoint Apps without re-deploying the Apps. This could save a significant amount of time during App Development.


Download Path:

Advanced REST Client plugin for Google Chrome

This is a Chrome Plugin that allows you configure and investigate REST Queries by configuring and executing REST API Call through the tool UI. It also allows us to look for the Stats of the REST Queries in execution.


Download Path:

Postman – REST Client plugin for Google Chrome

This is again a Chrome Plugin that allows you deal with REST Calls same as “Advanced REST Client plugin for Google Chrome”.

It is just a matter of choice which one you prefer to work with.


Download Path:

SharePoint 2013 Client Browser

This is the similar tool as SharePoint Manager with the only difference that it allows us to connect to SharePoint Sites Remotely using Client APIs. So now no more need to login to SharePoint Server to browser SharePoint Site Objects using this tool.


Download Path:


This is an awesome tool for testing SharePoint Send Mail Functionalities no matter if it is Custom or OOB functionality that we are testing.

It is used to verify if the SharePoint is sending mails to the recipients properly. This tool intercepts the mails that were sending to the recipients by SharePoint and allows you to view them in its own UI.


Download Path:


PowerGUI is one of the best tools available for PowerShell Programming. It provides intellisence support for writing PowerShell Scripts at the same time provides lot of useful windows for Debugging purposes.


Download Path:

SharePoint Software Factory

The SharePoint Software Factory is a Visual Studio Extension helping SharePoint Beginners, as well as experienced developers to create, manage and deploy SharePoint solutions without having to know schema internals of the SharePoint Artifacts.


Following is the list of few of the features offered by this extension-


And many more…

For a detailed list of available features you can visit :

Download Path:

SharePoint Solution Deployer

SharePoint Solution Deployer helps you to deploy SharePoint solution packages (.wsp) to multiple SharePoint environments. It deploys, retracts and upgrades one or more WSPs and can be extended to perform additional custom tasks in PowerShell before or afterwards.

It provides a simple XML configuration file which allows you to define the deployment environment by using variables i.e. to perform different actions on different URLs depending to which farm you are currently deploying.


Download Path:

SharePoint Diagnostic Studio 2010

Microsoft SharePoint Diagnostic Studio 2010 (SPDiag version 3.0) was created to simplify and standardize troubleshooting of Microsoft SharePoint 2010 Products, and to provide a unified view of collected data.

This tool can be used for-

  • Gathering relevant information from a farm
  • Displaying the results in a meaningful way
  • Identifying performance issues
  • Sharing or exporting the collected data
  • Providing reports for analysis

And much more…


Download Path:


SPServices is a jQuery library which abstracts SharePoint’s Web Services and makes them easier to use. It also includes functions which use the various Web Service operations to provide more useful (and cool) capabilities. It works entirely client side and requires no server install.


Download Path:

SharePoint LogViewer

SharePoint Log Viewer is a Windows application for reading and filtering Microsoft SharePoint ULS Logs.

It offers the following key features-

  • View multiple SharePoint log files at once
  • Search by any field
  • Filter the log by any field
  • File drag & drop support
  • Live monitoring for entire farm
  • Export filtered log entries
  • Bookmark log entries
  • Get popup notification of SharePoint log events from system tray
  • Receive email notifications on errors
  • Redirect log entries to event log
  • Supports SharePoint 2007, 2010 and 2013


Download Path:


FxCop is an application that analyzes managed code assemblies (code that targets the .NET Framework common language runtime) and reports information about the assemblies, such as possible design, localization, performance, and security improvements. Many of the issues concern violations of the programming and design rules set forth in the Design Guidelines, which are the Microsoft guidelines for writing robust and easily maintainable code by using the .NET Framework.


Download Path:

JavaScript Beautifier

This online tool is used to beautify, unpack or De-obfuscate JavaScript and HTML, make JSON/JSONP readable, etc.


Download Path:

JSON Formatter & Validator

This is an online tool to that can be used to validate the JSON Packets



Download Path:

Being a SharePoint Developer I can say using these tools should be the second habit for SharePoint Developers to enhance their development capabilities which results in quick delivery turn around.

Hope you all find it helpful.

SharePoint 2010 References

SharePoint 2010 Installation

  1. Managing and Implementing Microsoft SharePoint 2010 Projects
  2. Practical SharePoint 2010 Information Architecture

SharePoint 2010 Architecture & Governance

  1. Pro SharePoint 2010 Disaster Recovery and High Availability
  2. Pro SharePoint 2010 Governance

SharePoint 2010 Project Management

  1. SharePoint 2010 for Project Management, 2nd Edition
  2. Pro Project Management with SharePoint 2010

SharePoint 2010 Development

  1. Using Microsoft InfoPath 2010 with Microsoft SharePoint 2010 Step by Step
  2. Professional SharePoint 2010 Development
  3. SharePoint 2010 Development with Silverlight
  4. SharePoint 2010 Web Parts in Action
  5. Beginning SharePoint 2010
  6. Microsoft SharePoint 2010 Enterprise Applications on Windows Phone 7
  7. Inside Microsoft SharePoint 2010
  8. Microsoft SharePoint Foundation 2010 Inside Out

SharePoint 2010 Designer

  1. Pro SharePoint Designer 2010
  2. Beginning SharePoint Designer 2010
  3. Microsoft SharePoint Designer 2010 Step by Step

SharePoint 2010 Cloud Based Solution

  1. Developing Microsoft SharePoint Applications Using Windows Azure
  2. Professional SharePoint 2010 Cloud-Based Solutions
  3. Pro SharePoint 2010 Development for Office 365

SharePoint 2010 Search

  1. Pro SharePoint 2010 Search
  2. Working with Microsoft FAST Search Server 2010 for SharePoint

SharePoint 2010 PowerShell

  1. Microsoft SharePoint 2010 and Windows PowerShell 2.0

SharePoint Best Practices

  1. Expert SharePoint 2010 Practices

SharePoint 2010 Business Intelligence

  1. Professional Business Connectivity Services in SharePoint 2010
  2. Microsoft SharePoint 2010 Business Application Blueprints
  3. Microsoft SharePoint 2010 Business Intelligence Unleashed
  4. Microsoft SharePoint 2010 PerformancePoint Services Unleashed

SharePoint 2010 Branding

  1. Professional SharePoint 2010 Branding and User Interface Design
  2. Microsoft SharePoint 2010 Administration Cookbook

SharePoint 2010 Administration

  1. Pro SharePoint 2010 Administration
  2. SharePoint Server 2010 Administration 24 Hour Trainer

SharePoint 2010 Enterprise Content Management

  1. SharePoint Server 2010 Enterprise Content Management

SharePoint 2013 User Guides

  1. SharePoint 2010 at Work
  2. SharePoint 2010 Field Guide
  3. SharePoint 2010 Six-in-One
  4. SharePoint 2010 How-To
  5. Microsoft SharePoint Foundation 2010 Step by Step
  6. SharePoint 2010 All-in-One For Dummies
  7. Microsoft SharePoint Server 2010 Bible

SharePoint 2013 References

SharePoint 2013 Installation

  1. SharePoint 2013 Developer’s Installation Guide – LinkTech
  2. SharePoint 2013 Deployment Guide

SharePoint 2013 Architecture & Governance

  1. Microsoft SharePoint 2013: Designing and Architecting Solutions
  2. Microsoft SharePoint 2013: Planning for Adoption and Governance

SharePoint 2013 Development

  1. Beginning SharePoint 2013 Development
  2. Professional SharePoint 2013 Development
  3. SharePoint 2013 For Dummies
  4. Exploring Microsoft SharePoint 2013
  5. Microsoft SharePoint 2013 Developer Reference
  6. Microsoft SharePoint 2013 Inside Out
  7. Inside Microsoft SharePoint 2013
  8. Exam Ref 70-332: Advanced Solutions of Microsoft SharePoint Server 2013
  9. Exam Ref 70-331: Core Solutions of Microsoft SharePoint Server 2013
  10. QuickBooks 2013: The Missing Manual
  11. Custom SharePoint Solutions with HTML and JavaScript
  12. Microsoft SQL Server 2014 Business Intelligence Development
  13. Professional Visual Studio 2013
  14. QuickBooks 2013: The Missing Manual

SharePoint 2013 App Development

  1. Pro SharePoint 2013 App Development
  2. Microsoft SharePoint 2013 App Development

SharePoint 2013 PowerShell

  1. Beginning PowerShell for SharePoint 2013

SharePoint 2013 Business Intelligence

  1. Business Intelligence in Microsoft SharePoint 2013
  2. Pro SharePoint 2013 Business Intelligence Solutions

SharePoint 2013 Branding

  1. Pro SharePoint 2013 Branding and Responsive Web Development
  2. SharePoint 2013 Branding and User Interface Design

SharePoint 2013 Administration

  1. Professional SharePoint 2013 Administration
  2. Pro SharePoint 2013 Administration, 2nd Edition
  3. Microsoft SharePoint 2013 Disaster Recovery Guide
  4. Microsoft SharePoint 2013 Administration Inside Out

SharePoint 2013 Enterprise Content Management

  1. SharePoint 2013 WCM Advanced Cookbook
  2. Practical SharePoint 2013 Enterprise Content Management

SharePoint 2013 User Guides

  1. SharePoint 2013 User’s Guide, 4th Edition

SharePoint 2013 : Remote Event Receivers on List Item Event – Real Business Scenarios

In this fourth article in the series on Remote Event Receivers, we will look into some of the applicable business cases around the Remote Event Handlers.

You can reach the previous three articles in this series as follows:

  1. SharePoint 2013: Remote Event Receivers
  2. SharePoint 2013: How to develop Remote Event Receivers for App Events
  3. SharePoint 2013: How to develop Remote Event Receivers for List And List Item Events

We will investigate the working of the following scenarios which are quite obvious while working with SharePoint List & List Items.

Scenario 1 – How to restrict users to delete a certain item

In order to show case this scenario let’s consider an Item “Product-001-1” added to the List called “Products” as shown below:

Now let’s try to delete this item as highlighted below-



As soon as user try to delete the item SharePoint looks for any registered Event Receiver with the List and looking for its Receiver Definition to see what all event this Receiver is allowed to receive and executes it.

In our case we have registered the following Receiver Definition with the list-


Let’s investigate the code for register Remote Event Handler –

Since this a Before Event (as explained in one of the earlier post “SharePoint 2013: Remote Event Receivers”), we need to write the Code in “ProcessEvent” Method.

Step 1 is to check the type of Event that triggers this Event Receiver by making use of “SPRemoteEventType” Enum and “EventType” Property of the “SPRemoteEventProperties” object

Step 2 is to check the List Title by making use of “ItemEventProperties” collection of “SPRemoteEventProperties” object and ensure that we are handling Delete Events received only from a specific which in our case is “Products”

Step 3 is to check for the desired condition and if satisfied then set “ErrorMessage” and “Status” properties exposed by “SPRemoteEventResult” object.

In this case we have set a user friendly message and set status to “CancelWithError”. For all the valid status values we can look for “SPRemoteEventServiceStatus” Enum.

Step 4 is to return the SPRemoteEventResult object back to SharePoint


The setting we did in Step 3 will let SharePoint to terminate the event raised due user action and return the error message to SharePoint which would be rendered as Error Message for the user as highlighted below-


Scenario 2 – How to get Item Details after Item has been updated

In order to show case this scenario we can consider the same item as above and this time let’s let Edit the item as highlighted below



Now next thing is to investigate the code for registered Remote Event Handler –

Since this an After Event (as explained in one of the earlier post “SharePoint 2013: Remote Event Receivers”), we need to write the Code in “ProcessOneWayEvent” Method.

Step 1 & Step 2 are same as mentioned above

Step 3 is to fetch the Items Properties by making use of “ItemEventProperties” collection and preparing a variable to make it use later

It is worth noting that at this point, “ItemEventProperties” collection will contain the Properties of the List Item after the Update got succeed, which means that we can find all the updated values in the respective columns for the list item as highlighted and can consume as needed

Just to keep the story simple we are consuming these values in compiling a message to be written to Windows Event Log.

It is important to notice how we are accessing values of “Title” & “Price” Columns of that Item.

Step 4 is to write this message variable to Windows Event Log


Once execution is successful we can see the message logged in the Windows Event Log as shown below


Scenario 3 – How to validate User inputs using Remote Event Receivers

This scenario will talk on validating user inputs and terminate the execution as soon as the input value falls outside the valid value range.

For instance in this demo we are assuming a hypothetical business requirement demanding “Item Price should not exceed $300”

In order to showcase this validation scenario we can consider the same Item as mentioned above.

Let’s edit the item as shown below


Now specify the Item Price any greater than $300, here we are updating the Product Price as $350

As soon as we try to save the item, SharePoint handover the control to Remote Event Receiver which is registered with this list on Item Updating Event and Event Receiver validate the Item Price value against the specified business logic which on fail produces the error message “Price cannot exceed $300” as highlighted below-


If we look into the logic driving this business requirement we can see

Step 1 is to write the code in “ProcessEvent” handler as this action of updating the List Item is a Before Event [ItemUpdating]

Step 2 is to identify the Event Type and ensure that the business logic should be executed only in case of ItemUpdating event

Step 3 is to identify the Source of Event and ensure to handle the event only if the Source is “Product” List

Step 4 is to read the value of “Price” Field entered by the user

Step 5 is to validate the input Price value against the needed business logic

Step 6 is to set the “ErrorMessage” and “Status” Properties of the SPRemoteEventResult object. Set “Price cannot exceed $300” as Error Message and “CancelWithError” as Status. These properties let SharePoint to terminate the Event generated and no updates to the Item will get persisted.

Finally Step 7 is to capture information about the Item and Event and write it back to Windows Event Log.


These few simple scenarios might help you to understand the mechanics and objects exposed by Remote Event Receiver API that can be extended to achieve even more complex business scenarios at hand.

Hope you find it helpful… 🙂

SharePoint 2016: The Inside Story

This small write-up is based on the Presentation made by Bill Baer on “BRK2188 – What’s New for IT Professionals in SharePoint Server 2016” in Ignite Conference ended recently.

In this presentation Bill explained a lot of Enhancements & Improvements in SharePoint 2016, the Public Preview of which is going to hit the market soon. I have compiled the Key Takeaways under different categories as mentioned below-

Release Timeline Milestones

Regarding the release timeline, there are 3 milestones:

  • Q4 2015 – Public Beta (Beta 1)
  • Q1 2016 – Release Candidate
  • Q2 2016 – Final Version (RTM)

Hardware & Software Requirements

Hardware requirements are mostly the same as we have in SharePoint 2013:

  • Memory: For Single Server Deployment Scenarios it should be 16-24 GB. For Multi Server Deployment Scenarios it should be 12-16 GB
  • CPU: For either of the Deployment Scenarios it should be x64 Bits, 1 Quad Core
  • HDD: For either of the Deployment Scenarios it should be 80 GB

Software requirements have got a couple of changes:

  • Operating Systems : Windows Server 2012 R2 or Windows Server 10
  • Database Server: SQL Server 2014 or SQL Server 201x (VNext)
  • .Net Framework:5.2 if running on Windows Server 2012 R2 or 4.5.6 if running on Windows Server 10

Other Prerequisites:

  • Windows Management Framework 3.0
  • Application Server Role
  • Web Server (IIS) Role
  • Microsoft .NET Framework 4.5.2
  • Update for the .NET Framework 4 (KB2898850)
  • Microsoft SQL Server 2012 Native Client
  • Microsoft Identity Extensions
  • Microsoft Sync Framework Runtime v1.0 SP1 (x64)
  • Windows Server AppFabric 1.1
  • Windows Identity Foundation v1.1
  • Microsoft Information Protection and Control Client
  • Microsoft WCF Data Services

Deployment Scenarios

Unsupported Scenarios:

  • Deployments on Workgroup is not supported
  • Deployments on Client OS is not supported
  • Deployments with Dynamic Memory is not supported
  • Deployments on Windows Web Server is not Supported
  • Deployments in Standalone mode (Mode with In-Built SQL Server Express) is not supported

Supported Scenarios:

  • Deployments on Domain Controller is supported but recommended only for Development/Evaluation or Small Farms Scenarios
  • Deployment with Single Server Farm recommended only for Development/Evaluation Scenarios

Roles & Services

With SharePoint 2016 Microsoft introduces a new concept “MinRole” that governs the notion of processing a User Request End To End by a specific server. Based on the type of requests, these Roles and Services are broadly categorized under following categories:

  • User Services: All requests initiated by Users fall under this category. For example- Excel Services, User Profile, OneNote, Sync Clients, User Code (Sandbox Code), Project and so on.
  • Robot Services: All Automated, Scheduled Jobs fall under this category .For example- Timer Jobs, Search Applications and so on
  • Caching Services: All requests regarding Cache Management Scenarios and sometimes can hold up Request Management Scenarios as well. For example- Caching Services

MinRole Roles & Services are implemented as follows:

  • WebFrontEnd: This Role falls under “User Services” so this role is meant to serve End User Request. Servers assigned to this role are optimized for low latency. Services complying with this role are:
    • Access Services
    • Business Data Connectivity
    • Central Administration
    • Managed Metadata
    • Secure Store Service
    • State Management
    • Subscription Settings
    • User Code
    • User Profile
    • Visio Graphics
    • SharePoint Foundation Web Application
  • Application: This Role falls under “Robot Services” so this role is meant to serve backend jobs or Servers assigned to this role are optimized for low latency. Servers assigned to this role are optimized for high throughput. Services complying with this role are:
    • Crawl
    • Machine Translation
    • PowerPoint Conversion
    • User Profile Synchronization
    • Word Automation
    • Workflow Timer Service
    • SharePoint Foundation Web Application
  • Specialized Load: This is special type of role to support Random Role Assignments as per business requirements like we have in SharePoint 2013. Recommended for Deployment of Isolated Services like 3rd Party Applications etc. This Role is not accounted by Health Checkup Analyzer as this is exempted in the Product Code Base of SharePoint 2016. Services complying with this role are:
    • Excel Calculation
    • PerfomancePoint
    • Project
    • Search
    • SharePoint Foundation Web Application
  • DistributedCache: This Role falls under “Caching Services” so this role is meant to distributed cache for the farm. Servers assigned to this role can load balance end user requests among the Web Front Ends. Services complying with this role are:
    • Distributed Cache
    • Request Management
    • SharePoint Foundation Web Application


Role Enforcement and Health:

  • SharePoint Health Analyzer has new Health Checkup Rules running on Daily Basis checking for the Topology Compliance
  • This Health Rule will run Daily and scan all the servers in the farm except server assigned to “Specialized Load” Role
  • The Code Base for this Health Rule compares the Service Instances on each server with the Role assigned to it and verify if the server comply with expected Topology recommendations from Microsoft. If Server doesn’t comply with the expected Topology recommendations, in health analyzer we can see the option to fix it directly from there.

Upgrade & Migration

  • Upgrade from SharePoint 2010 (UI Mode 14 or 14.5) and SharePoint 2015 (UI Mode 15): Upgrading to SharePoint 2016 will only be supported from SharePoint 2013. If you’re still using SharePoint 2010 or a previous version, you’ll first have to upgrade to SharePoint 2013 and your site collection will have to be converted to 15 mode before you can upgrade to SharePoint 2016.
  • Upgrade via Database Attach: The upgrade is done via the database attach process, so nothing new here.
  • Migration: You can also choose to migrate content from a previous version of SharePoint using one of the available third party software applications.


Small Patch Size with no downtime:

  • Patches and updates will have a smaller footprint and will not require any downtime.
  • As with most of the new features, the new patching process was developed for SharePoint Online and SharePoint 2016 will now benefit from the lessons learned from managing SharePoint in the cloud.
  • In SharePoint 2013 an update is comprised of 37 packages and an additional 18 packages for each installed language pack.
  • In SharePoint 2016, an update is comprised of just 4 packages, plus 1 extra package for each installed language pack.

 Boundaries and Limits

In SharePoint 2016, here are the main improvements on different thresholds values:

  • Content Databases: Supports content databases with TBs (specific number is not yet defined). In SharePoint 2013 Size should not be more than 200GB per content database.
  • Site Collections: Supports 100,000 site collections per content database. In SharePoint 2013 this limit was 10,000 site collections per content database.
  • List Items: List item threshold will be over 5,000 items although no specific number is not defined yet.
  • Max File Size powered by BITS Protocol + Cobalt Protocol + Shredded Storage: Max file size is now 10GB and there won’t be character restrictions. Earlier it was 2GB in SharePoint 2013 with character restrictions. This file size is supported to be Uploaded or Downloaded is powered by combination of BITS Protocol (which is newly introduced in SharePoint 2016), Cobalt Protocol and Shredded Storage.
  • Search Indexing: Search index can now scale to to hold upto 500 million items which was 250 million items in SharePoint 2013’s search index

Performance and Reliability Enhancements

Some of these improvements were brought to SharePoint 2016 which is expected to support a four-9s availability level (99.99%):

  • Server role optimizations
  • Zero downtime patching strategy
  • Improved distributed cache reliability
  • Traffic management with intelligent routing and server health checks

Major Performance/Reliability/Flexibility improvements that can be seen in SharePoint 2016:

  • New File Management Protocols: SharePoint 2010 introduced the Cobalt protocol. With Cobalt, when a document is being edited and the user saves it, only the modified portion of the file is sent by the client application to the server, greatly reducing the amount of data transmitted between client and server. However, the server still has to fetch the whole document from the database and merge the existing content with the user changes before saving the whole document back to the content database. SharePoint 2013 brought the Shredded Storage mechanism which allows documents to be stored in small pieces in the content database. Because documents are already “shredded” in the database, the server does not have to fetch the whole document to merge the original contents with the changes, which reduces the server processing overhead. SharePoint 2016 adds BITS (Background Intelligent Transfer Service) protocol which will improve upload and download speeds and resiliency.
  • “Fast Site Creation“– A new Site Collection creation process: The new site collection creation process leverages the Copy method to clone a pre-configured site collection template at the content database level. This process avoids the overhead of feature activation since the features are already activated in the source site collection.
  • SMTP Connection Encryption: With the implementation of new “STARTTLS” connection encryption that supports sending mails to SMTP Servers on default or non-default ports. Earlier with till SharePoint 2013, only Default Port (25) was supported for SMTP Communications but now it is possible to choose any available port with the new “STARTTLS” connection encryption
  • User Profile Service: In SharePoint 2016 Bidirectional Synchronization has now been improved by removing built-in FIM Services and adding support for External FIM Service. 
  • Integrated Project Server: SharePoint 2016 included built-in Project Server with licensing controlled through Server/User Licensing


  • Support for ODF Format: SharePoint 2016 included support for ODF Format in Document Libraries where documents can now be saved in ODF Format and then can be edited in with program of choice.

 UI Improvements

SharePoint 2016 looks and feels mostly like the current version of SharePoint Online (in Office 365), but a few improvements were made to the UI, namely:

  • Authoring Canvas: New Authoring Canvas, a new and modern way to create content for a web page using a Sway-like user experience
  • Durable Links: Support for Durable Links which allows documents to be moved while keeping the URL intact, because it is based on a resource ID

Cloud Accelerated Experiences

One of the most touted new features of SharePoint 2016 is the support for cloud accelerated experiences or, in other words, the ability to surface features that are only available in the cloud, using a hybrid scenario:

  • Compliance: Compliance and data loss prevention (DLP) across cloud and on-premises. Sensitive Data can be Identified, Monitored and Protected through deep content analysis.
  • Cloud Search Service Application: Cloud search service application which unifies the on-premises and cloud search indexes and provides support for Office Graph / Delve experiences on-premises. As per plan this service will be available to SharePoint 2013 also by the end of this year
  • Distributed team sites: Distributed team sites across SharePoint 2016 and Office 365
  • Hybrid deployment: Hybrid deployment automation guided by UI-based configuration


  • SharePoint 2016 is still a year away which means some features are liable to change, improve and could be some more to be added by the time RTM Version is released next year.
  • Hybrid scenarios are easier than ever to deploy

Hope you find it helpful.

SharePoint 2013: How to develop Remote Event Receivers for List And List Item Events

In this third post on Remote Event Receivers we are going to explore the mechanics revolving around Remote Event Receivers on List/List Item Events.

The previous two posts in this series can be reached out at:

  1. SharePoint 2013: Remote Event Receivers
  2. SharePoint 2013: How to develop Remote Event Receivers for App Events

In order to show case this scenario we need to start with a Provider Hosted App as highlighted in the following steps:

  • Select “App for SharePoint” Project Template


  • Specify the URL of Host Web and select “Provider-Hosted” as Hosting Model.


  • Select “ASP.Net Web Forms Application” as Project Template for Hosting the Remote Web


  • Specify the Security Certificate details based on SharePoint Provider Hosted App Development Environment configuration


Click Finish to complete the Visual Studio Solution Wizard.

Now next thing is to add the required items to the SharePoint App Project

  • Select App Project => New Item => Add


  • Select “List” as Project Item Template and the list as “Products”

This List will act as the Source of Events which will be delegated to the Remote Event Receiver


On List Settings Page –

  • Select a Display Name for the List
  • Choose Template for List Instance as “Custom List”


In List Designer –

  • On Columns Tab, specify the Columns/Fields you need to add to the list

I took ProductName & Price as two fields to be added for Products List


  • On the List Tab, verify the Site Relative Url of List


Once we got our list created and configured, it is time to add a new SharePoint Item to the project. Guess What??

The Remote Event Receiver. Yes!!!!

  • Select App Project => New Item => Add


  • Select “Remote Event Receiver” as Project Item Template


  • Select Type of Event Receiver as “List Item Events”


  • Select Event Source as “Products” List
  • Choose what all events you want to let handle by this Remote Event Receiver. For now I am choosing “Item Added”, “Item Updated” and “Item Deleted” events


As soon as the List is added to the Project a Feature scoped to the App Web gets also added

Once we are done with the configuration steps as shown above, we can see following artifacts added to the Project as highlighted below:

  • Products List
  • List Instance of the Products List
  • Remote Event Receiver


If we notice Remote Web Project which is nothing but an ASP.Net Application, we can see the following artifacts added already to it:

  • Service Class [Product-Remote-Event-Receiver]: That represent the Remote Event Handler Code Base
  • TokenHelper.cs & SharePointContext.cs : These helper classes are added to VS2013 to execute all the heavy lifting related to Authorization and Authentication algorithms easily between Remote Web Server(SPWeb Host) & SharePoint Server(Front-end Server).


We will revisit the Service Class Code in a short while to understand its internal plumbing.

But for now let’s build the Solution and Run it.


Trust the App with all needed permissions when prompted.


As soon as we Grant the App with all of the required permissions, the App Launcher redirects the User to the Start Page for the App, which is residing in the Remote Web for this case as highlighted below


We can see the App Launcher added to the Site Contents of the Host Web as shown below


We can ensure the presence of App Web by using SharePoint Manager and inspects Products List that has been provisioned to the App Web during the App Deployment


We can browse the App Web from Browser also as shown below


Now in order to test the Event Receiver, let’s create a test item in Products List as shown below


Specify Product Name & Price and Click Save button


As soon as Item gets added, it triggers “ItemAdded” event which is delegated to Remote Event Receiver by SharePoint.

In Remote Event Receiver we have two methods “ProcessEvent” & “ProcessOneWayEvent”.

For more details on these methods you can revisit my earlier post SharePoint 2013: Remote Event Receivers

On Item added we can see Breakpoint hit in “ProcessEvent” Method as shown below


Similarly we can see Break Point hit every time the Item gets updated as highlighted in below steps




Likewise we can see Break Point hit when Item gets deleted as highlighted in below steps



Since we registered the Event Receivers to handle “ItemAdded”, “ItemUpdated”, “ItemDeleted” only so none of the other Events would be delegated to Remote Event Receiver by SharePoint.

In case if any more Events need to be handled we need to add <Receiver> Elements in the Element.xml file associated with Remote Event Receiver as and when needed.

SPRemoteEventProperties Object is your real friend:

“ProcessEvent” method of Remote Event Receiver provides an object called as “properties” that exposes a lot of useful properties that can help us to perform any desired operation on the Web or List or List Item.

Following are the important properties that are exposed by “properties” object:

  • Event Type: Returns the type of Event Triggered by SharePoint Source Object
  • Item Event Properties: If the Event Type is of “List Item Type”, then “ItemEventProperties” collection is returned with data entered by user in each field of the List Item
  • List Properties: Returns the List specific properties like List Name, List ID and so on
  • Login User Properties: Return User specific properties like User ID, Login Name and so on
  • Source Web Properties: Return Web specific properties like Web Url


This post is more focused on the mechanics offered by SharePoint around Remote Event Receivers for List/List Item Events.

We will meet in another post where it will be more focused on to the implementation details on Event Receivers dancing around some valid Business Use Cases.

Hope you find this post helpful.

SharePoint 2013: How to develop Remote Event Receivers for App Events

In this second post on Remote Event Receivers we are going to explore the implementation details of “Remote Event Handlers for App Events”.

In case you need to recall the concepts related to “Remote Event Receivers”, you can refer to my First post in this series SharePoint 2013: Remote Event Receivers

In order to show case the implementation details of Remote Event Handler for App Events, let’s start with creating a Provider Hosted App by using following steps:

Create New Project in Visual Studio using “App for SharePoint” Project template


Specify Host Web URL and choose “Provider-hosted” as App Type


Choose “ASP.Net Web Forms Application” as Project Template to create Remote Web for our Provider Hosted App


Specify Certification Details based on the configuration of Provider-Hosted App Development Environment. Following details needs to be provided:

  • Certificate Location
  • Password
  • Issuer ID


Once all the above steps executed successfully we will get a new Solution created with two projects:

  • PH-AppEventLifeCycle which is a Provider Hosted App
  • PH-AppEventLifeCycleWeb which is a Remote Web for App


Select Provider Hosted App Project and press F4 to see the Project Properties. In the Project Properties look for “App for SharePoint Events” section and enable all events that you want to get handled by Remote Event Receiver.

Here I have set all the three events “Handle App Installed”, “Handle App Uninstalling, “Handle App Upgraded” to True, this setting will allow SharePoint to delegate respective events to the registered Event Receiver.


In case you need to create an App Web for your Provider Hosted Web (though it is not necessary) you must have atleast one Web Scoped Artifact added in the Project as this action will force SharePoint App Framework to provision App Web during the App Deployment.

In this case I have added a Dummy Module deploying some sample file just to force SharePoint to create an App Web for our Provider Hosted App.


It is noteworthy to look for AppManifest.xml file as most of the configuration settings for an App are derived from here only.

In General Tab, we have two noteworthy Properties:

  • Start Page: It allows you to set any Page as App Start Page. In this case we have set it point to the Default.aspx Page in Remote Web.
  • Query String : Allows adding additional information as Query String Parameters while redirecting to the Start Page


In Permission Tab, we can specify the set of Permissions that App will need to perform desired tasks.

At the time of App Installation, App will request this permission set to be granted and that we will see few steps down the line.


Now the very next thing is to investigate the constitution of Remote Web Project “PH-AppEventLifeCycleWeb


In this Project we have following important Files to look for:

  • Default.aspx: This is the start page for Provided Hosted App as we set it in earlier steps. In this page we can perform actions that are desired for a specific task. For example we can provide UI for end users to interact with the App.

In this demo the code sample is reading the title of the Hosting Web as follows:

           Steps 1: Getting URL of the Host Web by reading “SPHostUrl” Parameter

           Steps 2: Instantiating Client Context by Calling GetS2SClientContextWithWindowsIdentity method provided by SharePoint Infrastructure by means of TokenHelper.cs Class

           Step 3: Once Client Context is Instantiated, we can make use of Managed CSOM to load the Web and read its Title Property as shown below


  • Scripts: We can go with the default set of scripts added during creation of the project, else we can add any desired script file to it


  • AppEventReceiver.svc : This Service class has been added to the Project as soon as you add a “Remote Event Receiver” Project Item to the Project


Let’s walkthrough through the code file and see what we got.

Step 1: Add “Microsoft.SharePoint.Client.EventReceivers” Namespace which is needed for Remote Service to handle Remote Events and inherit the class from “IRemoteEventService”

Step 2: Override the method ProcessEvent

Step 3: Specify Remote Event Service Status if you want to continue or reject, so that execution succeed or revert back

Step 4: Perform actions as per the business requirement. Here I am adding logs to Windows Event Log

Step 5: Return the Event Result back to SharePoint


Step 1: Override the method ProcessOneWayEvent

Step 2: Perform actions as per the business requirement. Here I am adding logs to Windows Event Log


  • Web.config: In Web.config file, there are a couple of “AppSettings” that are important to take note of-

              ClientId: Generated Automatically by Visual Studio for development perspective. At the time of App registration this can be regenerated and used accordingly.

              ClientSigningCertificatePath: Specify the path of Client Certificate exported during environment configuration.

              ClientSigningCertificatePassword: Specify the path of Client Certificate Password specified to protect the Certificate during environment configuration.

               IssuerId: Specify the path of Issuer ID generated during environment configuration


With this we are done with inspection to all of the important files in our solution.

Now it is time to Build the Solution and Run it.

In the below screen shot we can see the Client ID is generated by Visual Studio Tools during Build Process.


Once the Solution Build & Run successfully, the App Framework looks for the AppManifest.xml and find a permission set to be granted by App User on the Host Web.

So we have to grant permissions as specified in Permissions Tab of AppManifest.xml file and in order to grant the permissions click “Trust It”.


As soon as we grant the permissions, App Launcher looks for the App Start Page as specified in General Tab of AppManifest.xml file and Redirect the user to that page.

If we notice the URL in below screen shot, we find the App Start Page is default.aspx of Remote Web as specified in AppManifest.xml file for the App.


If we investigate the Site Structure using any tool like SharePoint Manager (one of my favorites), we can see an App Web by the name “PH-AppEventLifeCycle” is also provisioned due to the presence of Dummy Module we added to the Project earlier.


After App is getting installed successfully, we can also see an event log is added to the Windows Application Log as shown below based on the message we placed in the “AppEventReceiver.svc” code file:


Likewise while the App is uninstalling, we can see an event log is added to the Windows Application Log as shown below based on the message we placed in the “AppEventReceiver.svc” code file:


This simple walkthrough can help you to understand on how to deal with the App Events.

We can utilize these semantics under different business cases liking registering Event Receivers for existing lists or notifying users and so on.

Hope you find it helpful.

See you all in the next post of this series. 🙂