Understanding SharePoint App (Add-In) Module And Configuring App Environment In SharePoint Farm

There are two hosting options that Microsoft provides for App Module.

  1. Cloud-based Apps.

    Further, Cloud-based Apps can be divided in two parts.

    1. Provider-Hosted App: Bring your own server, hosting infrastructure.
    2. Auto-Hosted App: Windows Azure + SQL Azure provisioned invisibly as apps are installed.

  2. SharePoint-Hosted App

    Here, our concern is SharePoint-Hosted App. Therefore, we will focus only on SharePoint-Hosted Environment.

How do apps work?

Apps have their own, isolated URLs, which are separate from the URLs of the sites where the app is being deployed and where the app is being used.

Apps work as isolated componenst. This isolation can be achieved by two means:

  1. Create new domain to host your apps.
  2. Create sub-domain of the existing domain.

How does isolation take place?

Each app has its own unique URL, within the app domain. The app’s URL is based on a template. 



Now, you have to choose one of the options, shown above. I will choose the first option, which means creating a new domain.

So let’s start.

Go to your DNS Server-- >Press Windows+S -- > Type DNS.

Your DNS window will open.

Find “Forward Lookup Zones” , right click it and select “New Zone”.





Click “Next”.



Keep the default and click “Next”-- > Next,



Now, you have to specify a zone name. It’s up to you what you choose. If your site is public facing, you have to buy a domain name and if it’s only for an internal user then you can keep any name. I will use app.local.



Click Next.



Click Next and subsequently click Finish.



Your domain name is created successfully.



Now, you have to give wild card entry.

Right click on your new zone and select New Alias (CNAME).



Fill in * for Alias name (uses parent domain, if left blank). Click “Browse”.



Double click on your Server name.



Double click “Forward Lookup Zones”.



Double click the domain of your SharePoint environment.



Select “(Same as parent folder)” and click “OK”.



Click “OK”.

OR

Directly type your (frontend Server name, if your form is having single web front end Server. In case of multiple web front end servers, you will have to give NLB).(Domain Where SharePoint hosted).

In my case- srt-it-test-615.spsharepoint.local.



Check the new domain name

Click Start and then click Command Prompt.

At the command prompt, type ping followed by a subdomain of the domain that you created and then press ENTER. For example, ping test.spapps.local

If the ping command returns the correct IP address of your web front end Server, then your wildcard for the domain name is configured successfully.

Configure SharePoint Service Application for Apps

Prerequisite Service Application for SharePoint App Environment.

  1. App Management Service Application
  2. Subscription Settings Service Application

Create App Management Service Application

You can use PowerShell as well as Central Administration. I prefer central Admin

Go to central Administration – >Application Management -- >Manage service applications (Under Service Applications).

New-- > App Management Service.

Fill the particulars and click OK.





Now, your App Management Service Application is created.

Next, CreateSubscription Settings Service Application-->You have only one option to configure Subscription Settings Service Application and that is PowerShell.

$account = Get-SPManagedAccount "Domain\SPService Account"

(where Domain\SPService Account is Managed Account for Subscription Settings Service)

$appPoolSubSvc = New-SPServiceApplicationPool -Name SettingsServiceAppPool -Account $account

$appSubSvc = New-SPSubscriptionSettingsServiceApplication -ApplicationPool $appPoolSubSvc -Name SettingsServiceApp -DatabaseNameSettingsServiceDB

$proxySubSvc = New-SPSubscriptionSettingsServiceApplicationProxy -ServiceApplication $appSubSvc




Now, App Management Service Application and Subscription Setting Service Application is created.



Note: From System Settings-- > Manage services on the Server.

Make sure App Management Service and Microsoft SharePoint Foundation Subscription Settings service is running.



Configure App URL

Go to Central Administration -- > Apps -- > Configure App URLs (Under App Management)



App domain: Domain name which you created for App. In my case “spapp.local”.

App prefix: It can be anything. I prefer “app”.



Click OK.

(Optional) Now create App Catalog

Click Central Administration-- > Apps



Click Manage App Catalog.



Click OK.



Fill the particulars and click OK.





Now your app catalog is created. You can upload your organization app here.



Now, go to your site and add app from SharePoint Store.

Note: Make sure you are not signed in with system account otherwise you won’t be able to download app.