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
- Open your SharePoint Central Administration.
- Go to Application Management > Manage services on server.
- Start Microsoft SharePoint Foundation Subscription Settings Service.
Create Forward Lookup Zone
- Press Windows + Q.
- Type DNS and click it. This opens the DNS Manager.
- Select [server, in my case: moon] > Forward Lookup Zones > [domain name, in my case lc.corp]
- Right-click domain name (lc.corp) > New Alias (CNAME).
- In the Alias name textbox, enter *.app.
- As a result, *.app.lc.corp will be the FQDN for any SharePoint App that gets installed on the environment.
- At FQDN for target host, Click Browse.
- 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)
- Click OK twice.
- Start a command prompt and type: ping test.app.lc.corp. If you followed the steps correctly, this returns a reply.
Create Service Applications
- Go to http://msdn.microsoft.com/en-us/library/fp179923.aspx
- 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
- Open SharePoint Central Administration.
- Click Application Management > Manage Service Applications.
- Verify that AppServiceApp is present and started.
- Verify that SettingsServiceApp is present and started.
- Click Application Management > Manage services on server.
- Check that the App Management Service is running.
- Open SharePoint Central Administration.
- Click Apps.
- Click Manage App Catalog.
- Click Create a new app catalog site.
- Click OK.
- Enter Title: DevAppCatalog.
- Enter Web Site Address: (sites/) DevAppCatalog.
- Enter a Primary Site Collection Administrator, in our case this is lc\administrator.
- Enter the following end users: Everyone.
- Click OK.
- Open SharePoint Central Administration.
- Click Apps.
- Click Configure Store Settings.
- Set Apps for Office from the Store to Yes.
- 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