Share via


SharePoint 2013: Creating a Dev Environment - Configuring Apps

 If you don't know how to create a Dev Environment; go back to Creating a Dev Environment

Configuring Apps

This Wiki page contains a detailed description on how to configure Apps for SharePoint 2013.

Start Subscription Service

  1. Open your SharePoint Central Administration.
  2. Go to Application Management > Manage services on server.
  3. Start Microsoft SharePoint Foundation Subscription Settings Service.

Create Forward Lookup Zone

  1. Press Windows + Q.
  2. Type DNS and click it. This opens the DNS Manager.
  3. Select [server, in my case: moon] > Forward Lookup Zones > [domain name, in my case lc.corp]
  4. Right-click domain name (lc.corp) > New Alias (CNAME).
  5. In the Alias name textbox, enter *.app.
  6. As a result, *.app.lc.corp will be the FQDN for any SharePoint App that gets installed on the environment.
  7. At FQDN for target host, Click Browse.
  8. Double-click [server name (moon)] > Forward Lookup Zones > [domain name (lc.corp)] > (same as parent folder). (if you could not see "(same as parent folder)", please change Record Types to All Records)
  9. Click OK twice.
  10. Start a command prompt and type: ping test.app.lc.corp. If you followed the steps correctly, this returns a reply.

Create Service Applications

  1. Go to http://msdn.microsoft.com/en-us/library/fp179923.aspx
  2. Copy the script from section "Create an isolated app domain on your development computer", step 6. This script looks like this:
$account = Get-SPManagedAccount "domain\user"
$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
$appAppSvc = New-SPAppManagementServiceApplication -ApplicationPool $appPoolAppSvc -Name AppServiceApp -DatabaseName AppServiceDB
$proxyAppSvc = New-SPAppManagementServiceApplicationProxy -ServiceApplication $appAppSvc

Where:
"domain\user" is a managed account in SharePoint Farm.

Note: The account to run the SharePoint Management Shell must be:

  • securityadmin role in Database Instance
  • db_owner in all databases will be updated
  • belong to Administrator group on the local server 

From a SharePoint 2013 Management Shell prompt, execute this code.

Verify the new service applications

  1. Open SharePoint Central Administration.
  2. Click Application Management > Manage Service Applications.
  3. Verify that AppServiceApp is present and started.
  4. Verify that SettingsServiceApp is present and started.
  5. Click Application Management > Manage services on server.
  6. Check that the App Management Service is running.
  1. Open SharePoint Central Administration.
  2. Click Apps.
  3. Click Manage App Catalog.
  4. Click Create a new app catalog site.
  5. Click OK.
  6. Enter Title: DevAppCatalog.
  7. Enter Web Site Address: (sites/) DevAppCatalog.
  8. Enter a Primary Site Collection Administrator, in our case this is lc\administrator.
  9. Enter the following end users: Everyone.
  10. Click OK.
  1. Open SharePoint Central Administration.
  2. Click Apps.
  3. Click Configure Store Settings.
  4. Set Apps for Office from the Store to Yes.
  5. Click OK.

Click App Management > Configure App URLs
In the App Domain text box, type: app.[domain name] (e.g. app.lc.corp).
In the App prefix text box, type any prefix that is used  to prefix the subdomain of App urls, e.g.: lcapp.
Click OK.

Now, check if you can add online Apps to your SharePoint environment. But don't do this using the SharePoint System Account, otherwise you'll see a message stating: "Everything is fine, but we had a small problem getting your license. Please go back to the SharePoint Store to get this app again etc. etc."

This is a nice example of misplaced SharePoint 2013 friendliness. Don't expect this small problem to go away by itself!

Troubleshooting

If you're trying to add Apps and get an error saying:
"Sorry, something went wrong. 
 Sorry, we couldn’t complete your purchase. Please try again later."

It could be that

- The machine you use to visit the SharePoint Store is configured with an incorrect date.

  • You're using a System Account for accessing the SharePoint Store