SharePoint 2016 Preview Install – First look

SharePoint 2016 Preview was released yesterday on Aug 24.

Download from here:


After installing, here are my comments as I walk through for noticeable changes:

  1. Similar to Office 365, there is a similar ‘App Launcher’ at the top left.

Newsfeed, OneDrive and Sites sit under your personal My Site.

sp16preview-app launcher

2. Under List Settings, there is a new setting ‘Automatic Index Management’:
This may help with the list view threshold constraint where default  5,000 items for a list.


There is a new ‘Large list automatic column index management job’ timer job that may support this setting on the configured lists.


After running this timer job, I went to the List Settings > Indexed columns and haven’t noticed any indexed columns. Perhaps the “indexing” can be seen elsewhere. I will have to continue to investigate.

3. Central Administration > Office 365 > Configure hybrid OneDrive and Site Features

SharePoint Hybrid Solutions Center:


4. There are many more new timer jobs at a total of 228. In this screen shot, you may notice some that are new such as DeleteUnusedAbs, Document Changed Anti-virus Processing, DrainInlineStreams and Dump site information. Not sure what these do, but get ready to understand them and leverage accordingly.


To compare to a list of SharePoint 2013 timer jobs, read

5. “layouts/15” in URL and SharePoint Root Folders

For example, http://<hostname>/_layouts/15/start.aspx#/Shared%20Documents/Forms/AllItems.aspx

The URL contains “_layouts/15” rather than “_layouts/16” taking after the production major version number. Maybe that is why we are seeing the 2013 UI and perhaps in future there could be a change in the UI look.

Also in the the file system there is still the SharePoint 14 root folder (i.e. SharePoint 2010). Maybe this will go away in final release.


6. New Video thumbnails and playback.

I uploaded a 475mb video I grabbed from into the Documents library. I happened to be running a PowerShell script adding 10,000 list items to a custom list and when playing the video in this thumbnail, the playback was a little choppy and slow. So even though this is a single server farm setup, one has to consider scalability and performance of playing videos. This video is surely stored in the content SQL database.


Preparing Developer Virtual Machine for SharePoint 2016 Preview

In anticipation for the SharePoint Server 2016 Preview release this month of August 2015, I have prepared a Hyper-V virtual machine for development and evaluation purposes.

System Requirements

Scenario Deployment type and scale Processor RAM Hard disk
Database server running a single SQL instance Development or evaluation installation with
the minimum recommended services
64-bit, 4 cores 12-16 GB 80 GB for system drive
100 GB for second drive

My setup:

OS: Windows 10 Pro
Intel Core i5 @ 2.67Ghz 4 Logical Processors
120GB Intel Solid State Drive for VM Disks only

Hyper-V Virtual Machine
2 Logical processors

Windows Server 2012R2 with Update
SQL Server 2014 with Service Pack 1
Visual Studio 2015

My Software Preparation:

I recently upgraded to Windows 10 and I am enjoying it including the new Start Menu with Tiles and Cortana.

I installed the Hyper-V Manager feature
Control Panel > Programs and Features > Turn On windows features or off
Check off ‘Hyper-V’


I ran Hyper-V Manager and create a new Virtual Machine and went through the wizard and allocated system resources such as 2 logical processors, location of the VM disk in my solid state drive, and 12 GB of ram. I highly recommend solid state drives for SharePoint VMs as I notice a big performance gain with much higher IOPS.

Note that according to minimum requirements of 4 processors, I will try to settle with only 2 logical processors but if needed I’ll bump up to 4 logical processors. I plan on saving VM system resources by turning off services in Central Administration ‘Services on Server’ such as SharePoint Server Search, Excel Calculation services, Access Services, Machine Translation Service until I want to use them.

I had installed the Windows Server 2012 R2 operating system through .ISO image file.

After installation is complete and booting up Windows Server, I ensured to add roles and features with
Active Directory Domain Services
Web role and app role.
Application Server role

Windows Server Add Role

Next, I installed SQL Server 2014. I just include all the features.

Next, I installed Visual Studio 2015 to develop SharePoint apps/add-ins. I noticed that the install options, you can choose Office Developer tools. Note that you shouldn’t expect it to support SharePoint 2016, but my guess it will to some extent such as simple web parts and list and library deployment.

To download Office Tools separately, visit

Now wait for the SharePoint 2016 Preview download hopefully sometime this month of August.

SharePoint 2013 Custom AJAX filters on List View Web Parts

Implement ‘exact match’ filter against the list view web part on text values and drop down values using AJAX for great user performance. An alternative to filtering in a fly out menu of the list view web part’s column values.ajaxfilter1
Filter by ‘Title’

Filter by ‘Task Status’


I am essentially emulating the column based filters that are out-of-the-box functionality of the SharePoint 2013 List view web parts. I do this by tracking down how the filtering is executed in the SharePoint inplview.js code. Then wrap the filtering JavaScript logic through custom text boxes.


You can see the URL query string parameters reflect the filtering
/SitePages/Tickets.aspx#InplviewHashdba27ef6-7bff-4c0f-8ec1-b3e3e18fb0b8=FilterField1=LinkTitle-FilterValue1=Printer broken

For large lists (i.e. > 5,000 items), keep in mind to index the columns you want to filter by. You can find the setting in the List Settings page and find a link ‘Indexed Columns’

<table style="" border="0">
        <td><input type="text" id="title" onblur="TitleFilter(); return false;" /></td>
            <button onclick="TitleFilter(); return false;">Filter by Title</button>
            Task Status:
            <input type="text" id="taskStatus" onblur="TaskStatusFilter(); return false;" />
            <button onclick="TaskStatusFilter(); return false;">Filter by Task Status</button>
            <button onclick="TitleAndTaskStatusFilter(); return false;">Filter by Title AND Task Status</button>

<script language='javascript'>
       function MyRefreshPageToEx(lvTableID, url, bForceSubmit) {

        // Hardcode reference to list view <table> Id attribute
        var tblv = document.getElementById("{BE9A90D1-BF5D-401B-8A9B-C44CCCD14241}-{DBA27EF6-7BFF-4C0F-8EC1-B3E3E18FB0B8}");
        var clvp = CLVPFromCtx(tblv);

        if (clvp != null && clvp.ctx.IsClientRendering) {
            clvp.ctx.queryString = url;
            if ((typeof clvp.ctx.operationType == "undefined" || clvp.ctx.operationType == SPListOperationType.Default) && Boolean(clvp.ctx.ListData)) {
                var fromPage = clvp.ctx.ListData.FirstRow - 1;
                var toPage = Number(GetUrlKeyValue("PageFirstRow", false, url));

                if (!isNaN(fromPage) && !isNaN(toPage) && fromPage != toPage)
                    fromPage < toPage ? (clvp.ctx.operationType = SPListOperationType.PagingRight) : (clvp.ctx.operationType = SPListOperationType.PagingLeft);
        else {
            SubmitFormPost(url, bForceSubmit);

    function TitleFilter() {
        var title = $('#title').val()
        var url;
        if (title) {
            url = "?List={BE9A90D1-BF5D-401B-8A9B-C44CCCD14241}&View={DBA27EF6-7BFF-4C0F-8EC1-B3E3E18FB0B8}&FilterField1=LinkTitle&FilterValue1=" + title
        inplview.MyRefreshPage = MyRefreshPageToEx;
        inplview.MyRefreshPage(null, url, null);

    function TaskStatusFilter() {
        var taskStatus = $('#taskStatus').val()
        var url;
        if (taskStatus) {
            url = "?List={BE9A90D1-BF5D-401B-8A9B-C44CCCD14241}&View={1F1B1E55-992B-4A03-98B2-9E5D34916611}&FilterField1=TaskStatus&FilterValue1=" + taskStatus
        inplview.MyRefreshPage = MyRefreshPageToEx;
        inplview.MyRefreshPage(null, url, null);

    function TitleAndTaskStatusFilter() {
        var title = $('#title').val()
        var taskStatus = $('#taskStatus').val()

        // HARD Code: query string to reference List GUID and View ID
        var url = "?List={BE9A90D1-BF5D-401B-8A9B-C44CCCD14241}&View={DBA27EF6-7BFF-4C0F-8EC1-B3E3E18FB0B8}&ViewCount=1&IsXslView=TRUE&IsCSR=TRUE&";
        if (title && taskStatus) {
          url = url + "FilterField1=LinkTitle&FilterValue1=" + title + "&FilterField2=TaskStatus&FilterValue2=" + taskStatus
        } else if (title && !taskStatus) {
          url = url + "FilterField1=LinkTitle&FilterValue1=" + title
        } else if (!title && taskStatus) {
          url = url + "FilterField1=TaskStatus&FilterValue1=" + taskStatus
        inplview.MyRefreshPage = MyRefreshPageToEx;
        inplview.MyRefreshPage(null, url, null);

There is some hard coding in the custom JavaScript code making references to the list view web part such as the table Id, list GUID and view GUID.

Find the table element Id as follows.


  • Inplview.js filtering only supports exact match of values and not partial match
  • OR operand is not supported in the inpview.js from what I can see.
  • This custom approach is a bit of “hack”. Since it is client side, there is no impact to the SharePoint farm on the server side. Nevertheless, follow any development guidelines in your team. At the least, regression testing is recommended on SharePoint product patching and upgrades for any breaking changes.

The solution fit

I think the better solution fit is where the user already knows exactly what to filter on, but doesn’t want to scroll a largest list of values through the OOTB column filters every single time. For example, filtering by exact name or a small number.

SharePoint 2013 Custom List View Web Part Refresh

In the SharePoint 2013 list view web part, the paging, filtering and sorting functionality is driven by the inplview.js file. This is supported by AJAX calls against a RESTful service inplview.aspx. I am able to extend the JavaScript inplview object to implement client side refresh as data is updated on the server.

To configure the automatic refresh by OOTB (out-of-the-box) configuration, go to the Web Part Properties: 



What I find unattractive of this approach is that it is using the older AJAX UpdatePanel introduced in ASP .NET 2.0.

  • There is at least 23kb transferred for each refresh which is a relatively heavier in bandwidth.
  • The http response time is longer.
  • Using IE 8 browser, there is a memory leak such that memory utilization by the browser maxes out.
  • The out of the paging, filtering and sorting with the AJAX options do not work well together. For example, the AJAX refresh option sometimes shows no rows even after repeated combination of filtering and manual OOTB AJAX refresh. To resolve, refresh the page without any query string parameters.

The applicable business scenario or requirement is when frequently added and updated list items by multiple users are to be seen updated in the browser without user requiring to manually refresh the page. 

In SharePoint 2013, when the user interacts with the list view web part for activities such as paging, column filtering and sorting, there is an AJAX request making a RESTful call to inplview.aspx.
refresh4 Compared to the OOTB refresh, the inplview.aspx REST calls are significantly lighter in bandwidth and has faster response time.

How inplview.js Works

The javascript code that supports the list view web part paging, sorting and filtering is in the inplview.js file

The sequence of calls are made as follows:

  1. Browser
    1. User clicks on list view web part to page, sort and filter
    2. invoke objects in various SharePoint .js files
    3. invoke objects inplview.js
  2. Server
    1. inplview.aspx that is a RESTful http service
    2. HTTP response back to browser with only JSON formatted row data.

Using the chrome JavaScript debugger against inplview.js, I have identified the following sequence of function calls. To support the refresh, I have “forked” the code with my own custom functions.

Original OOTB sequence Customized “forked” sequence
RestoreAllClvpsNavigation Refresh_RestoreAllClvpsNavigation
EnumCLVPs(RestoreClvpNavigation) EnumCLVPs(Refresh_RestoreClvpNavigation)
RestoreClvpNavigation(clvp) <skip>
clvp.RestoreNavigation(); <skip>
CLVPRestoreNavigation() Refresh_RestoreClvpNavigation(clvp)

The Implementation

There is no explicit data refresh support in the inplview javascript code so I have injected custom code that extends the inplview javascript object to have supporting functions to implement refresh.

// automatic refresh based on interval
function autoRefresh()
 window.setInterval(listViewRefresh, 2000); // 20 seconds

// refresh all list view web parts on the page
function listViewRefresh() {
 $('#lblMessage').text('refreshed ').fadeIn("slow").fadeOut("slow"); // debugging
 inplview.MyRestoreAllClvpsNavigation = MyRestoreAllClvpsNavigation;

// Enumerate list view web parts
function MyRestoreAllClvpsNavigation()

// refresh referencing list view web part
function MyCLVPRestoreNavigation(clvp) {
 var strHash = ajaxNavigate.getParam("InplviewHash" + clvp.WebPartId());
 if (strHash == null)
 strHash = '';

 var strInpl = '?' + DecodeHashAsQueryString(strHash);
 var strShowInGrid = GetUrlKeyValue("ShowInGrid", true, strInpl);

 if (strShowInGrid == "True") {
 InitGridFromView(clvp.ctx.view, true);
 else if (clvp.ctx.inGridMode) {
 ExitGrid(clvp.ctx.view, true);
 clvp.strHash = strHash;
 clvp.fRestore = true;
 var curRootFolder = GetRootFolder2(this);

 if (curRootFolder != null)
 strInpl = SetUrlKeyValue("RootFolder", unescapeProperly(curRootFolder), true, strInpl);
 clvp.RefreshPagingEx(strInpl, true, null);


$(document).ready(function() {



  1. Overcome IE8 browser memory leak issue
  2. Noticeable performance improvement over OOTB Ajax option
  3. The ability to extend and customize the client side rendering of the list view web part functionality


  1. Upgrades and patches:
    Since this is extending from product JavaScript code, in the event of upgrades or patching, there could breaking changes.
    To mitigate this risk, remember to regression test after a product upgrade and patch.


  1. Still supports general list view paging, column filtering and sorting.
  2. Exception: column filtering and sorting is not supported on lookup columns as it is already with OOTB.
  3. Ability to refresh all list view web parts that exist on the same page.

I’ll have a another blog post to add filtering based on user input by customizing the inpvliew.js

WaitForCustomEvent 1

SharePoint 2013 Workflow Integration with the WaitForCustomEvent Activity

Implementing an integration scenario with SharePoint 2013 Workflows using WaitForCustomEvent Activity in Visual Studio 2012 Technical Requirement: Integrate a SharePoint workflow with another application to call into the application and wait for a response with data.

Applicable business scenarios

  • A document management approval workflow notifies a CRM system of a customer engagement and provides a reference number back to the workflow.
  • A SharePoint workflow assigns and emails an end user to do some work in another application. The end user goes to the other application to do this work and it notifies the workflow of completion and other application data. The SharePoint workflow continues.

The following is an implementation flow that is applied to the above business scenario.

  1. The workflow instance calls an external application through a RESTful service passing correlating information and the custom wait event name.
  2. Workflow is in a wait state by the WaitForCustomEvent.
  3. The external application executes its relevant business logic and is then ready to notify the workflow through the SharePoint API by passing correlating information, event name and any event args (e.g. data).
  4. The workflow custom wait event handles the call and continues execution with the given event args. At this point, the workflow status can be set.
WaitForCustomEvent 2

High level development

  1. In Visual Studio 2013
    • Create a Workflow Custom Activity project item.
    • Deploy solution to a site.
  2. In SharePoint Designer 2013
    • Create a SharePoint 2013 workflow. The deployed activity will apear in the Actions menu
    • Add the custom action to the workflow design surface.
    • Publish workflow

Updating workflow custom activity and redeploy steps

  1. Create Workflow in SharePoint Designer 2013
    • Clear SP Designer website cache
  2. Create Workflow Activity in Visual Studio 2012
  3. Create external application to receive and publish the even back to the running workflow instance.

The WaitForCustomEvent Activity

This activity is part of the toolbox when you want to create a Custom Workflow Activity in Visual Studio 2012.

WaitForCustomEvent 3

When deployed to the SharePoint server, it will show up as a custom action in SharePoint Designer 2013. This activity has an input of EventName and an output of Result.

WaitForCustomEvent 12

SharePoint Client Side Object Model: WorkflowInstanceService.PublishCustomEvent

In the external application, leveraging the SharePoint Client Side Object Model, use the WorkflowInstanceService.PublishCustomEvent method to call to the waiting workflow instance to continue. This activity would handle the event is by a CSOM API call using the PublishCustomEvent method.

Parameter Description Type
instance The instance of a workflow that is running. WorkflowInstance
eventName The event name that would be declared in the WaitForCustomEvent activity String
payload Data that would be passed to the workflow. String

As you can see, the EventName input is associated to the eventName parameter and the Result output to the payload parameter.

WorkflowServicesManager workflowServiceManager = new WorkflowServicesManager(web);
var workflowInstanceService = workflowServiceManager.GetWorkflowInstanceService();
workflowInstanceService.PublishCustomEvent(workflowInstance, "CustomEventName", "Eventpayload:value;key:value");

Sample code on the use of this method is in  Sohel Blog post

Creating the Workflow Custom Activity in Visual Studio 2012

    1. Create new project SharePoint 2013 – Empty Project
    2. Right click on the project > Add new item > Select Workflow Custom ActivityWaitForCustomEvent 5
    3. Click on the xaml file and see the designer surface.
    4. Open the Toolbox pane
    5. Drag and drop the WaitForCustomEvent activity on to the designer surface. I have also added WriteToHistory activity for debugging/tracing purposes. WaitForCustomEvent 6
    6. Create arguments to make the design of this custom workflow activity dynamic and reusable in Sharepoint Designer workflows. At the bottom of the designer surface, click on the Arguments tab.WaitForCustomEvent 7

      Set “EventName” as an input argument and the “EventOuput” as the output argument. To give you an idea of what we are trying to achieve by “dynamic” here is a peak of how it will be used in SharePoint Designer workflow. The following blue text are placeholders for literal values or variables.

      WaitForCustomEvent 11 WaitForCustomEvent 9

    7. So now let’s get back to setting up these arguments in Visual Studio 2012. Click on the WaitForCustomEvent activity properties pane. Enter “EventName” argument for the EventName input Enter “EventOuput” argument for the Result ouput.WaitForCustomEvent 10
    8. Let’s surface these arguments to SharePoint Designer to look likeWaitForCustomEvent 8 Click on the .actions4 file. Setup as follows:
      <Action Name="WaitEventActivity" ClassName="WaitEvent.WaitEventActivity" Category="Custom" AppliesTo="all">
        <RuleDesigner Sentence="Wait Event Name %1 ( Event Args %2 )">
          <FieldBind Field="EventName" Text="Event Name" Id="1"
          DisplayName="Event Name triggered from an external system" />
          <FieldBind Field="EventOutput" Text="Event Output" Id="2"
          DesignerType="TextBox" DisplayName="Event ouput from an external system"   />
          <Parameter Name="EventName" Type="System.String, mscorlib" Direction="Optional"
          Description="Event Name" />
          <Parameter Name="EventOuput" Type="System.String, mscorlib" Direction="Out"
          Description="Event Output" />

Note: you can find more examples in the workflow15.actions4 file. These are all the out of the box actions. They are located at C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\TEMPLATE\1033\Workflow

    1. Deploy the solution to your SharePoint site.
      This is deployed as a farm solution and activate the feature at the web scope.
    2.  Open SharePoint Designer 2013 and open the site where you had activated the feature with the WaitForCustomEvent activity.
    3. Create a new Workflow in 2013 workflow platform
    4. In the ribbon, click Action > Add the Call HTTP Web Service to make a call to the external application through a RESTful service such that the necessary business logic will be executed.
      Pass correlating information and custom event name as query. This will be used to by the external application to call back to the workflow.
    5. In the ribbon, click Action and you should see in the Custom group as defined in .actions4 file.
      WaitForCustomEvent 12
    6. Create the following workflow with using the actions Set Workflow Status, Log to History List WaitForCustomEvent 13 

Creating a Mock External Application

This application will serve as a mock external system or application noted as “3” in the diagram above. This application will serve two purposes:

  • Self-hosted RESTful services that wraps the business logic of which the workflow can call into. You may to choose to host in IIS web server.
  • This business logic will make a call to publish a custom event notification to the running workflow instance using the SharePoint .NET Client Side Object Model.

How to create Self-Host a Web API

  1. Add New Project
  2. Select Console Application
  3. Right-click the Project > Manage NuGet Packages
  4. Install Microsoft ASP.NET Web API Self Host
  5. Add assembly references > browse C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\ISAPI\
    • Microsoft.SharePoint.Client.WorkflowServices
    • Microsoft.SharePoint.Client.Workflow
    • Microsoft.SharePoint.Client.Runtime
    • Create a class and method
  6. Create a business class with the method
    PublishCustomWorkflowEvent(string url, string listTitle, string documentTitle, string eventName, string eventArgs)
      using (ClientContext ctx = new ClientContext(url))
        ctx.Credentials = new NetworkCredential("\\ ", "");
        // Best practice: retrive credentials in a secured credentials store.
        Microsoft.SharePoint.Client.WorkflowServices.WorkflowServicesManager workflowServiceManager = new Microsoft.SharePoint.Client.WorkflowServices.WorkflowServicesManager(ctx, ctx.Web);
        var workflowInstanceService = workflowServiceManager.GetWorkflowInstanceService();
        List list = ctx.Web.Lists.GetByTitle(listTitle);
        int itemId = 1;
        CamlQuery query = new CamlQuery();
        query.ViewXml =@""
        + documentTitle
        + "";
        ListItemCollection listItems = list.GetItems(query);
        if (listItems.Count > 0)
          itemId = listItems[0].Id;
        var workflowInstances = workflowInstanceService.EnumerateInstancesForListItem(list.Id, itemId);
        // Once we get the workflow Instance, we can get the instance properties as shown below. Any properties in Workflow Initiation form will also be available:
        if (workflowInstances.Count > 0)
        foreach (WorkflowInstance instance in workflowInstances)
          WorkflowStatus status = instance.Status;
          if (instance.Properties.Count > 0)
            var itemUrl = instance.Properties["Microsoft.SharePoint.ActivationProperties.CurrentItemUrl"];
            Console.WriteLine("Internal Status: " + instance.Status);
            Console.WriteLine(" Item Url: " + itemUrl);
            Console.WriteLine(" Workflow User Status: " + instance.UserStatus);
            string userStatus = instance.UserStatus;
            var propertyValue = instance.Properties["Microsoft.SharePoint.ActivationProperties.ItemId"];
            workflowInstanceService.PublishCustomEvent(instance, eventName, eventArgs);
            Console.ForegroundColor = ConsoleColor.Magenta;
            Console.WriteLine("Event Args: " + eventArgs);
        } // end foreach workflowInstances
  7. Create a RESTful method in a controller class inherited from the APIController.
    public string DoSomeWork(string url, string listTitle, string documentTitle, string eventName)
      string output = string.Emptyy;
      // DO SOME WORK
      // publish custom event to running workflow instance
      PublishCustomWorkflowEvent(url, listTitle, documentTitle, eventName, eventArgs);
     return output;</pre>

Workflow Manager 1.0 Setup and Validation on a Development Environment

Sharing my approach and knowledge of setting up a SharePoint 2013 development server with Workflow Manager 1.0. There are many step by step guides on installing and configuring Workflow Manager 1.0; however, this is from a topology point of view as well as areas of validating the setup.

SharePoint Designer 2013 | Publishing 2013 Workflow Error

Using SharePoint Designer 2013, I create and publish a simple custom workflow (2013 platform). I get the following within the error message:

“There was no endpoint listening at net.pipe://localhost/SecurityTokenServiceApplication/appsts.svc that could accept the message.”


  • I am able to browse to http://localhost:32843/SecurityTokenServiceApplication/securitytoken.svc with no issues or errors showing.
  • I have installed Worfklow Manager (and update) on a WFE server in a 3 tier setup.
  • I am trying to publish this through a domain account which was not used to install, but is still local administrator and Site Collection administrator.
  • The net.pipe binding exists in IIS web site for SharePoint Web Services
  • Windows Server 2012, installed all WF updates, SP server updates, SP Designer update


Windows Services -> Start the Net.Pipe Listener Adapter service

Service Description: Receives activation requests over the net.pipe protocol and passes them to the Windows Process Activation Service.

I just stumbled upon this service by associating the name “Net.Pipe” and the error message containing “There was no endpoint listening at net.pipe://…”

What is “net.pipe”?

netNamedPipeBinding binding, which provides cross-process communication on the same machine. Named pipes do not work across machines.”