Configure and Create App in SharePoint 2013

As we know SharePoint 2013 has introduced an App Model approach and everyone is eager to develop the app. Using this article, I am explaining the procedure to include App configuration as well as App development.

Section 1: Configuring App in SharePoint 2013

  1. Create DNS entry for App

    Go to Administrative Tools then click on "DNS":


    See the following screen:


    Right-click then select "Create New Alias(CName)". Refer to the following screen:


    Select "same as parent" as in the following screen:


    Your final screen should be as in the following, click "Ok":

  2. DisableLoopbackCheck in regedit (to avoid authentication prompt)

    Open the Registry window:


    Go to "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa" and right-click and select:


    Rename "DisableLoopbackCheck" and right-click on "modify" and change the value to "1". The final output should look as in the following:

  3. Check timer job to check spadmin & sptimer services

    PowerShell script:
    net start spadminv4
    net start sptimerv4
  4. Set App Domain

    PowerShell script:
    Set-SPAppDomain "<Domain name>"
  5. Check Appservices and Subscription services

    PowerShell script:

    Get-SPServiceInstance | where{$_.GetType().Name -eq "AppManagementServiceInstance" -or $_.GetType().Name -eq "SPSubscriptionSettingsServiceInstance"} | Start-SPServiceInstance
    And ensure service:
    Get-SPServiceInstance | where{$_.GetType().Name -eq "AppManagementServiceInstance" -or $_.GetType().Name -eq "SPSubscriptionSettingsServiceInstance"}
  6. Configuring SPSubscriptionService

    PowerShell script:
    $account = Get-SPManagedAccount "<Farm Account>"
    $appPoolSubSvc = New-SPServiceApplicationPool -Name SettingsServiceAppPool –Account$account
    $appPoolAppSvc = New-SPServiceApplicationPool -Name AppServiceAppPool -Account $account
    $appSubSvc = New-SPSubscriptionSettingsServiceApplication –ApplicationPool $appPoolSubSvc –Name SettingsServiceApp –DatabaseName SettingsServiceDB
    $proxySubSvc = New-SPSubscriptionSettingsServiceApplicationProxy –ServiceApplication $appSubSvc
  7. Configure AppManagement ServiceInstance

    PowerShell script:
    $appAppSvc = New-SPAppManagementServiceApplication -ApplicationPool $appPoolAppSvc -Name AppServiceApp -DatabaseName AppServiceDB
    $proxyAppSvc = New-SPAppManagementServiceApplicationProxy -ServiceApplication $appAppSvc
    After performing step 6 and 7, In Central Administration site go to Application Management -> Manage Service Applications. You will able to see:

  8. Configure tenant for hosting SharePoint 2013 Apps

    PowerShell script:
    Set-SPAppSiteSubscriptionName -Name "app" -Confirm:$false
  9. Configure App URL in Central Administration

    In Central Administration site go to "Apps" -> "Configure App Url's":

Section 2: Develop SharePoint Hosted App using VS2012

After completing Section 1 of this article, we are ready for creating apps in SharePoint 2013. I will explain the procedure for creating a hello world app in SharePoint 2013.

  1. Open Visual Studio 2012, create a new project then select the language C# then the template "SharePoint Apps". Give it the name "HellowWorldApp". Click "Ok".

  2. Select "SharePoint Hosted App" and click on "Finish":

  3. The folder structure should look as in the following:

  4. Click on "Scripts\App.js". Add some text in it as in the following:

  5. Click on "Deploy" to deploy the solution. You are done with your first SharePoint 2013 App.

Section 3: Verify your app

  1. Open the site where your App is deployed. For example "Team Site". Click on "Site Action" - "Site Contents":

  2. Under Site Content, you will able to see the app you created, "HellowWorldApp". Click on "HellowWorldApp".

  3. Here is my app:


You can learn more about the basics of Apps from the MSDN link:

Hope you liked my Article... happy Learning.


Up Next
    Ebook Download
    View all
    View all