Multiple nodes with the same URL ‘/amsV1/analysis/PupilGrades.aspx’ were found. XmlSiteMapProvider requires that sitemap nodes have unique URLs.


You might want to look into the layouts.sitemap XML file in the C:\inetpub\wwwroot\wss\VirtualDirectories\<port>\_app_bin directory. In that path look in the layouts.sitemap file. This file should contain multiple entries for the pages in question.

SharePoint 2013/2016/Online: CSOM vs JSOM vs SSOM vs REST

This SharePoint tutorial, we will explore different hosting types and technology abbreviations used in SharePoint 2010/2013/2016 and elsewhere too. Useful API reference of the most frequently used types and objects implemented in the Server object model (SSOM) and at least one client programming model: .NET client-side object model (CSOM), JavaScript object model (JSOM), and/or REST API.

Different SharePoint Object Model Types

CSOM (Client Side Object Model)

SharePoint CSOM core assembly is Microsoft.SharePoint.Client.Runtime.dll and Microsoft.SharePoint.Client.dll, which stands for Client-Side Object Model. It is a web service-based API of SharePoint.

It allows access to SharePoint data and features from remote clients. CSOM was introduced in SharePoint 2010 and greatly enhanced in SharePoint 2013.

SP.ClientContext.get_current() for normal use. New SP.ClientContext(‘url…’) for specific SPWeb.

SSOM (Server Side Object Model)

Server Object Model core assembly is Microsoft.SharePoint.dll which is installed in the Global Assembly Cache. The Server Object Model will be executed on the server-side & it provides a rich set of classes in representing & manipulating SharePoint objects.

Must be deployed on the same farm Server-side object model. C# (or Visual Basic) uses only Microsoft.SharePoint (14) DLL. Must be deployed on the same farm.

REST (Representational State Transfer)

The SharePoint REST API interface is based on the REST-based Open Data protocol (OData) which is a platform-independent open standard. REST in 2010 is only for ListData.svc. Note that SPServices (jQuery plugin) utilizes the.asmx services in _/vti/bin , such as /_vti_bin/Webs.asmx.

sharepoint csom vs ssom, sharepoint csom vs jsom

SharePoint Model Types

CSOM (Client Side Object Model)

CSOM, which stands for Client-Side Object Model, is a web services-based API of SharePoint. It allows access to SharePoint data and features from remote clients. CSOM was introduced in SharePoint 2010 and greatly enhanced in SharePoint 2013.

JSOM (JavaScript Object Model)

Access information in the host web using the Javascript Object Model, you need to use an SP.ClientContext.get_current() for normal use. New SP.ClientContext(‘URL…’) for specific SPSite. Note this works cross-SPSite in 2013.

SSOM (Server Side Object Model)

Server Object Model is the most extensive API set available for SharePoint 2013. The core assembly is Microsoft.SharePoint.dll which is installed in the Global Assembly Cache.

The Server Object Model will be executed on the server-side & it provides a rich set of classes in representing & manipulating SharePoint objects. Must be deployed on the same farm.

REST (Representational State Transfer)

The REST API in SharePoint offers nearly the same functionality as JSOM. Furthermore, it is easier to use for a developer not coming from the SharePoint world since REST interfaces are standardized. This makes the choice of technology easier than for JSOM.

Various Hosting Option for SharePoint Code

SharePoint hosted

A SharePoint-hosted app may provide basic resources into its app web such as HTML/CSS/JS files, site column/content-type/list definitions, etc. Under no circumstances can server-side code run within a SharePoint-hosted app.

Provider hosted

Provider-hosted apps for SharePoint include components that are deployed and hosted outside the SharePoint farm. They are installed to the host web, but their remote components are hosted on another server but are meant to be hosted more manually (i.e. On Azure). So you fire up a web application, on any server, and then use S2S to connect to SharePoint.

Sandboxed Solutions

The remnant from 2010, can be uploaded to the Solution gallery through a sandbox solution. Support for a limited subset of the SSOM. No file access, so can’t deploy anything to the _layouts folder. If you use the limited SSOM-part (C#) your solution will be considered deprecated. Support for templates such as list templates and content types deployed directly to the host web.

Farm Solutions

In the case of SharePoint farm solutions, you required full access for deployment and farm solutions will be deployed through PowerShell in SharePoint 2013/2016/2019.

Microsoft officially announced the discontinuation of the Autohosted apps model in SharePoint Online/Office 365 after it has been tested for the last few months.

sharepoint csom vs ssom, sharepoint csom vs rest api, sharepoint jsom vs csom

This SharePoint tutorial we learned various options to develop components through code like SharePoint server object model, client object model, JavaScript Object model and Rest API.

courtesy: Sagar Pradeshi

How to configure metadata navigation for a document library in SharePoint Online or SharePoint 2013/2016/2019?

This SharePoint article will discuss how to configure metadata navigation for a document library in SharePoint Online or SharePoint 2013/2016/2019?

A metadata navigation filter will help the user to dynamically filter the content from the SharePoint lists or document libraries based on the metadata in SharePoint Online or SharePoint Online or SharePoint 2013/2016/2019.

What is the MetaData in SharePoint

Metadata is data about data, meaning metadata describes additional details about an item, file or document. Like Metadata for a file can be author name, document type, document size, etc. 

If you want to associate metadata to a document, first you need to add a column to the document library.

Why we have the Metadata column concept?

SharePoint introduced metadata to overcome problems with the folder structure inside a document library.

Few problems with folder structure inside the SharePoint document library are:

  1. Very difficult to get information from the nested folder structure.
  2. If you have more nested folders then you may face URL length limitation problem, because URL length is limited to ~260 characters.
  3. You can not sort or filter from SharePoint document library headers. Like this, there are lots of disadvantages.

How to configure metadata navigation for a list or library SharePoint Online/SharePoint 2010/13/16/19

To demonstrate this, I have particularly selected the SharePoint custom document library.  In this document library, I have added one custom column of choice type called “Course For” which has values like Administrator- Developer- End Users- Interview Questions & Answers. I have already uploaded a few documents to the document library as well.

  1. To work with the Metadata navigation we need to activate a site level feature “Metadata Navigation and Filtering” first.
  2. To activate that, click on the gear icon on the top right corner of a page and then click Site Content. This will open a site contents page.
  3. Click on the Site Settings link. This will open the site settings page
  4. Then click on the “Managed site features” link which is presented in the “Site Actions” category.
  5. Then in the “Site Features” features page look for the “Metadata Navigation and Filtering” feature and click on Activate like below:

Once the feature is activated successfully, go back to the document library again.

Click on the gear icon and then select “Library Settings”. In the library settings page, click on the “Metadata navigation settings” which is under General Settings.

Then in the “Metadata Navigation Settings” page go to the “Configure Key Filters” section and there you can see the available columns in the “Available Key Filter Fields” section.

Here I have added the “Course For” to appear in the filter list like below:

Now if you will go back to the document library you can see a Key Filters section must be appearing on the right side like below.

You can click on the checkbox for the Course  For, and it will show only the documents which match the filter criteria.

Configure Navigation Hierarchies: Metadata navigation is really helpful to find content in large lists or libraries.

You can also Configure navigation hierarchies from the Metadata Navigation Settings page. Visit the Metadata Navigation Settings page and then from the “Configure Navigation Hierarchies” section select the column which you want to appear in the hierarchy like below. Here I have added the Course custom column which we have created for the document library.

Note: These navigation hierarchies are only visible in the Classic experience and not in the modern experience of a site.

Conclusion: In this article, we have understood how to configure metadata navigation for a document library in SharePoint Online, and SharePoint 2013/2016/2019. 

Happy SharePointing!!!

Resolve the Session Timeout issue in the SharePoint Provider Hosted add-in

I am working on a SharePoint Provider Hosted app for a long time now. I have a good amount of experience in working with the SharePoint’s App Model and especially with the SharePoint Online.

Currently I am working on same type of project which is hosted in azure and deployed in SharePoint Online.

Project module is already deployed to production environment and clients are using them happily.

But today client has come with an issue of they are not able to submit the form.

Problem: Client is not able to submit the form from the Provider hosted app which has the code hosted on azure.(I have used the MVC as the back end to write the code with C#)


  • I have tried to submit the test data and it submitted without error
  • I have tried to submit the data with the same data as client is submitting still it has submitted successfully.
  • So to trouble shoot the issue properly I went a call with the client it submitted successfully during the call too.
  • While I was on a call with a client at that time client stated that it took him almost 1.5 Hours to capture the data to be submitted and during that period form is opened and in ideal state.
  • At that I got a strike in my mind that this is the issue of session timeout for the MVC application

Root Cause:

  • So I started to regenerate the same issue by putting the page ideal for 30 minutes as I know there is a default timeout of 20 minutes and viola I am able to regenerate it.


  • After so much of trial and error finally I am able to resolve this issue by adding a dummy call to an ActionResult which does nothing and simply returns the “Success” as JSON result.
  • Then I wrote up a java script block in a java script file and then reference it to the shared view.
  • A JavaScript block calls that dummy action every 5 minutes to keep the session alive.

If you are using ASP.NET MVC – you do not need an additional HTTP handler and some modifications of the web.config file. All you need – just to add some simple action in a Home/Common controller:

public JsonResult KeepSessionAlive() {
    return new JsonResult {Data = "Success"};

write a piece of JavaScript code like this one (I have put it in one of site’s JavaScript file):

var keepSessionAlive = false;
var keepSessionAliveUrl = null;

function SetupSessionUpdater(actionUrl) {
    keepSessionAliveUrl = actionUrl;
    var container = $("#body");
    container.mousemove(function () { keepSessionAlive = true; });
    container.keydown(function () { keepSessionAlive = true; });

function CheckToKeepSessionAlive() {
    setTimeout("KeepSessionAlive()", 300000);

function KeepSessionAlive() {
    if (keepSessionAlive && keepSessionAliveUrl != null) {
            type: "POST",
            url: keepSessionAliveUrl,
            success: function () { keepSessionAlive = false; }

and initialize this functionality by calling a JavaScript function:


Please note! I have implemented this functionality only for authorized users (there is no reason to keep session state for guests in most cases) and decision to keep session state active is not only based on – is browser open or not, but authorized user must do some activity on the site (move a mouse or type some key).

Courtesy: Maryan

Do let me know if you are able to resolve this or have any other concerns in a comment box below.

Happy Share Pointing!!!