Configure Add-In or app development environment in SharePoint server 2016

create sharepoint hosted add in sharepoint 2016 visual studio 2017

Here in this SharePoint 2016 tutorial, we will discuss how to configure SharePoint add-ins development environment and create a simple hello world web part in SharePoint server 2016 on-premises.


Let us first discuss what are the things required for setting up SharePoint add-in development environment.

– Create a Forward Lookup Zone.
– Create a CName alias.
– Configure App management service.
– Configure Microsoft Subscription Setting Service.
– Configure App URLs.

If you are new to SharePoint 2016, then you can read SharePoint 2016 installation steps (FREE PDF Guide) and SharePoint 2016 new features.

Create Forward Lookup Zone

First we will see how we can create forward lookup zone, Open DNS to create a forward lookup zone in your Domain
Click Start -> DNS




configure add in environment for sharepoint 2016
configure add in environment for SharePoint 2016

On the window click on the SharePoint domain -> Click Forward lookup zone -> Create New

 sharepoint 2016 apps configuration step by step
sharepoint 2016 apps configuration step by step

In the New zone wizard -> Click Next -> use the primary zone as default

how to configure sharepoint 2013 on-premises deployments for apps
how to configure sharepoint 2013 on-premises deployments for apps

Click Next -> Pick All DNS Server running on the domain controller in this domain by default -> Click Next


 how to configure sharepoint 2016 on-premises deployments for apps

how to configure sharepoint 2016 on-premises deployments for apps

Provide the Zone name in my case I am created “SharepointApps.com” then click next

setup sharepoint 2013 app development environment
setup sharepoint 2013 app development environment

In the dynamic update, page accept as default -> Click next to complete the FLZ setup

setup sharepoint 2016 app development environment
setup SharePoint 2016 app development environment

Create a CName alias

Next step create wildcard alias name CNAME in your new domain
Right click on the forward look zone created -> click New Alias CNAME

setup add in environment sharepoint add-ins on office 365 or SharePoint 2016
setup add in environment sharepoint add-ins on office 365 or SharePoint 2016

In the wizard Provide Alias name as “*”
Now your FQDN look like this “*.apps.com”
Then click on the browse button to pick the target host of your domain

sharepoint 2016 app management service
sharepoint 2016 app management service

Click Ok to complete the process

enable apps sharepoint 2016
enable apps sharepoint 2016

Configure Subscription settings and App management service application

– There service application used to provide the app permissions and create the subdomains for the app.
Before we proceed check the app management service and subscription settings service are in running state
Open sharepoint central administration -> Click Application management ->under service application ->Manage services in server

sorry apps are turned off sharepoint 2016
sorry apps are turned off sharepoint 2016

PowerShell to create Microsoft Subscription Settings Service Application

Use the below PowerShell cmdlet to create the Microsoft subscription settings service application



//Get the managed service account
$account = Get-SPManagedAccount “sharepoint20160\appservice”
//Create the new application pool for subscription settings service
$appPoolSubSvc = New-SPServiceApplicationPool -Name SettingsServiceAppPoolA -Account $account
//Create subscription settings service application
$appSubSvc = New-SPSubscriptionSettingsServiceApplication -ApplicationPool $appPoolSubSvc -Name SettingsServiceApp -DatabaseName MynewSubscriptionservice
//create proxy for the subscription settings service
$proxySubSvc = New-SPSubscriptionSettingsServiceApplicationProxy -ServiceApplication $appSubSvc

PowerShell cmdlet to create App management service application

Use the below PowerShell cmdlet to create the App management service application
//Get the managed service account
$account = Get-SPManagedAccount “sharepoint20160\appservice”
//Create the new application pool for app
$appPoolAppSvc = New-SPServiceApplicationPool -Name AppServiceAppPool -Account $account management service
//Create app management service application
$appAppSvc = New-SPAppManagementServiceApplication -ApplicationPool $appPoolAppSvc -Name AppServiceApp -DatabaseName MyappDb
//create proxy for the app management
$proxyAppSvc = New-SPAppManagementServiceApplicationProxy -ServiceApplication $appAppSvc service

You can also do the same from sharepoint central administration page to manage and create service application like App management service and subscription setting services

Configure App Service url

Open sharepoint central administration-> Click Apps -> App management -> Configure App URLs

 Configure an environment for apps for SharePoint Server

Configure an environment for apps for SharePoint Server

Provide the App Domain and App Prefix

Sharepoint 2016 APPS not enabled
Sharepoint 2016 APPS not enabled

Click Ok.

Develop Hello World SharePoint Add-in

Open visual studio -> New project -> Pick a template SharePoint add-in

How to enable apps in SharePoint 2016
How to enable apps in SharePoint 2016

Click Ok
Choose the add-in type SharePoint hosted or provider hosted add-in
– Sharepoint Hosted Addin -> It’s hosted inside the SharePoint farm
– Provider hosted addin -> It deploys the contents and host outside of SharePoint like any web servers and azure websites.

In this demo I have chosen SharePoint hosted add-in -> click Next

 sharepoint 2016 app development
sharepoint 2016 app development

Choose the add-in version “Sharepoint 2016”

create sharepoint hosted add-in sharepoint server 2016
create SharePoint hosted add-in SharePoint server 2016

Click Finish
After successful creation of add-in project look like this

create add in sharepoint 2016 visual studio
create add in SharePoint 2016 visual studio
create add in sharepoint 2016 visual studio 2017
create add in SharePoint 2016 visual studio 2017

Content -> Holds the stylesheets by default it uses App.css
Images -> This module helps to store the images inside your project
Pages -> This module helps to hold the pages inside your project.
Scripts -> This module help to hold your javascript files like jquery, Bootstrap references
Appmanifest.xml ->This file helps to manage the title, name, version, icon, permission and locale settings of the current add-in.
Feature -> This folder helps to include and exclude the modules in the project, For examples, you don’t need some modules you can just exclude without deleting
– Package – Helps to package your app modules into a solution file. App
Click on the page module -> Open default.aspx
Under contentplaceholdermain replace the HTML below
<div>
<p id=”message”>
<!– The following content will be replaced with the username when you run the app – see App.js –>
Hello world
</p>
</div>
Click save -> Right click on the solution file -> click deploy it into SharePoint

create add in sharepoint 2016 visual studio 2015
create add-in SharePoint 2016 visual studio 2015

Open the site
Click on gear icon -> Click site contents

create sharepoint hosted add in sharepoint 2016 visual studio 2017
create SharePoint hosted add in SharePoint 2016 visual studio 2017

Now the app has been successfully installed in your site collection
Click on the Helloworld SharePoint add-in.

sharepoint 2016 app development step by step
sharepoint 2016 app development step by step


Now you know how to setting up a SharePoint add-in development environment and create a project into it. We discuss more in my upcoming articles.

Check out Best Alternative to InfoPath -> Try Now

You May Also like the Following SharePoint Online Tutorials: