3. Creating the Subscription Service Application
The Subscription Service application in
SharePoint 2010 was used only for multi-tenant environments. It is
still used for that purpose in SharePoint 2013, but now it also plays a
key role in the delivery of the App Management service as well. As
such, you must create it before you continue. Also, to keep you on your
toes you have to do it from the Management Shell.
1. Make sure you are in the Management Shell.
2. Type the following and press Enter:
$sa = New-SPSubscriptionSettingsServiceApplication -ApplicationPool "Default
SharePoint Service App Pool" -Name "Subscription Settings Service" -
DatabaseName "Subscription_Settings_Service_DB"
3. Type the following and press Enter:
New-SPSubscriptionSettingsServiceApplicationProxy -ServiceApplication $sa
4. Type the following and press Enter:
Get-SPServiceInstance | where{$_.TypeName -eq "Microsoft SharePoint
Foundation Subscription Settings Service"} | Start-SPServiceInstance
5. Confirm your work against the screen shown in Figure 8.
4. Configuring DNS for the App Management Service
Each app that you publish is published
to its own URL. To facilitate this across your farm, these apps are
created either as a subdomain of your current domain or as a new,
unique domain. The subdomain route is easier but it opens the door to
cross-site scripting vulnerabilities, so this section walks you through
the more secure option.
Because these changes are domain wide, your
company’s DNS administrator may need to make these changes. The
following section assumes you are the person with the required
permissions, and it steps through the most typical scenario. There are
hundreds of variables in play here, of course, so your steps may vary
for your production environment. For example, you might use a Linux DNS
server making the how-to below, useless. Regardless, you will need to
create the DNS records.
As a reminder, the example primary domain name is Contoso.com. The domain controller name is DC, the SharePoint server name is Server, and you will be creating a new DNS Zone called ContosoApps.com:
1. Log onto a Domain Controller as a Domain Administrator.
2. From the Start menu, open DNS Manager.
3. Double-click the server name so you see Forward Lookup Zones in the main pane.
4. Double-click Forward Lookup Zones.
5. From the right pane, right-click Forward Lookup Zones (see Figure 9).
6. From the fly out, select New Zone to start the wizard.
7. At the Welcome screen of the New Zone Wizard, click Next.
8. For the Zone Type, accept the default of Primary zone and click Next.
9. For Active Directory Zone Replication Scope, accept the default and click Next.
10. In the Zone Name dialog, enter ContosoApps.com
for the zone name and click Next.
11. For Dynamic Update, accept the default and click Next.
12. At the Completing the New Zone Wizard screen, click Finish.
13. From the right pane, double-click ContosoApps.com.
14. Right-click ContosoApps.com and select New Alias (CNAME)..., as shown in Figure 10.
NOTE The
official guidance from Microsoft is to use a CNAME record, but most
other DNS recommendations are to use a HOST (A) record instead of an
Alias. In some load-balanced environments there is not a registered DNS
entry for the load-balancer and other DNS entries reference the IP
address of the load balancer, which would cause additional confusion
here.
15. For Alias name, enter *.
16. For Fully qualified domain name (FQDN) for target host:, enter server.contoso.com
.
POINTING YOUR NEW DNS ZONE
The example assumes you have only one
SharePoint server, so it is clear where you point your new DNS Zone. If
you have more than one SharePoint server serving web traffic, then you
most likely have a network load balancer. If so, then you would point
your alias at the load balancer. No trickery going on here. You just
want to ensure that all the web requests for apps go to all your
SharePoint web servers.
17. Check your work against the dialog shown in Figure 11 and click OK.
18. Close DNS Manager and log off the domain controller quickly, before you break something.
That completes the configuration of the new DNS
zone. Assuming you don’t change your farm configuration drastically,
you should never have to modify the settings made here.