The App Management Service is new to SharePoint 2013. The SharePoint software had been missing its integration with Microsoft Marketplace for a while now. This service will allow you to purchase SharePoint applications directly from Microsoft Marketplace. The licensing information and permissions is managed by the App Management service in a SharePoint 2013 farm. This service is accessed each time an app is requested to used in SharePoint in order to verify license validation and permissions. This service has its own service application database.
SHAREPOINT APPS OVERVIEW
An app for SharePoint is a custom built application that provides a specific functionality to SharePoint end users. You can purchase an app for SharePoint from SharePoint Store which is hosted by Microsoft. Developers who develop SharePoint apps submit their apps to Microsoft which is published in the SharePoint store and is available for site owners or end users who can download and install this app to their SharePoint site. Some apps are free and some apps have to be purchased. The Microsoft SharePoint store also handles purchases, upgrades, and updates for an app that is published through the SharePoint Store. Detailed information on apps can be found on the Microsoft site at http://technet.microsoft.com/en-us/library/fp161232(v=office.15).
WHERE ARE APPS DEPLOYED?
Apps are deployed to their unique domain name instead of the same domain name where your SharePoint site is hosted. This is helpful because the app process runs under a separate process and does not affect the SharePoint sites. For this article, my SharePoint site is hosted at http://sharepoint which is an alias for http://sharepoint.contoso.com. For apps, I will configure a separate wild card domain in the DNS e.g. *.apps.contoso.com. Why a wild card domain? Because the URL of app is in the form of http://prefix-apphash.appdomain.com. The apphash portion is dynamic and by creating a wild card domain you don’t have to create a domain for every app.
DNS SERVER CONFIGURATION
First we have to create a wild card domain that will be hosting our apps. Follow these steps to configure the domain:
- Start DNS Manager from Administrative Tools. Right click in the details pane and select “New Alias (CNAME)".
- In the “New Resource Record” specify the *.apps in “Alias name” option. Asterisk or ‘*’ is used to create a wild card or catch all domain. Select “Browse” and navigte to the fully qualified parent domain which is “sharepoint” in our case. Select OK.
Review the resource record and select OK to create this record. - Next, lets verify our wild card domain. Start a command prompt and ping to apps-spapp.123456.apps.contoso.com. This should be successful.
If you are using SSL, please refer to http://technet.microsoft.com/en-us/library/fp161236(v=office.15) for more information on SSL configuration.
APP MANAGEMENT SERVICE CONFIGURATION
Before you can purchase SharePoint Apps from Marketplace, you will need to configure the App service in your farm using the steps mentioned below:
- Select Start –> All Programs –> Microsoft SharePoint 2013 Products –> SharePoint 2013 Central Administration.
- Select System Settings –> Manage Services on server.
This will display the “Services on the Server” page. Confirm that the following services are started: - App Management Service
- Secure Store Service
- The App Management Service depends on the following services in order to work. We will create these service applications using SharePoint Management Shell because the SPSubscriptionSetingsServiceApplication service application cannot be created through the interface. The steps have been mentioned in details at http://msdn.microsoft.com/en-us/library/fp179923(v=office.15).aspx and I am going to follow the instructions below.
- SPSubscriptionSetingsServiceApplication
- SPAppManagementServiceApplications
- Start SharePoint 2013 Management Shell by selecting Start –> All Programs –> Microsoft SharePoint 2013 Products –> SharePoint 2013 Management Shell.
- We have to ensure that the spadmin and sptimer services are running. Type the following commands:
net start spadminv4
net start sptimerv4 - Next, ensure the dependent SharePoint “services” mentioned in item #3 are started. The services are started if they are stopped. This is done through Start-SPServiceInstance command.
Get-SPServiceInstance | where{$_.GetType().Name -eq "AppManagementServiceInstance" -or $_.GetType().Name -eq "SPSubscriptionSettingsServiceInstance"} | Start-SPServiceInstance - Next, ensure that the SPSubscriptionSettingsService and AppManagementServiceInstance services are online.
Get-SPServiceInstance | where{$_.GetType().Name -eq "AppManagementServiceInstance" -or $_.GetType().Name -eq "SPSubscriptionSettingsServiceInstance"} - Next we need to specify the service account under which the SPSubscriptionSettingsService and AppManagementServiceInstance services should run. In my case, this account is CONTOSO\svcspfarm.
$account = New-SPManagedAccount
$account = Get-SPManagedAccount “CONTOSO\svcspfarm”
$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
- Next, go to Central Administration and select Application Management –> Service Applications
–> Manage Service Applications. The above command should create two service applications titled “SettingsServiceApp” and “AppServiceApp”. In my situation, I recreated the App Management Service from the interface so the names are bit different. Make sure that the service application status is “Started”. - Next we will create a “Corporate Catalog” site that we will use in configuration App Store. The app catalog site contains catalogs for apps for SharePoint and Office. You can use this site to make apps available to end users if they are no allowed to add apps on their own. There is no option available on the Central Administration interface. I found a way to create it somewhere on the forums so thanks to whoever posted it :). Note down the URL of the central administration web site. In my case it is http://sharepoint:27000. Append “/_admin/ManageCorporateCatalog.aspx” so the URL should read http://sharepoint:27000/_admin/ManageCorporateCatalog.aspx. Put this URL in Internet Explorer and you will see “Manage App Catalog” page.
Select “Create a new app catalog site” option and select “OK”.
You will see “Create App Catalog” screen. Specify the following information and select OK. It might take a while so stay patient.
Title and Description: App Catalog
Web Site Address: http://sharepoint/sites/appcatalog
Primary Site Collection Administrator: CONTOSO\administrator
End Users: Everyone
Quote Template: None - Next, we will configure our Apps settings. In Central Administration, select “Apps” from Quick Launch. This will display the “Apps” management page.
Select App Management –> Manage App Catalog and verify that the App Catalog Site information is correct.
Select the “Apps” link in Quick Launch again. Select “Configure App URLs”. You will see the “Configure App URLs” page that allows you to configure SharePoint App URLs. In the “App Domain” option, specify the alias of your SharePoint site which is “apps.contoso.com” in my case. In “App Prefix” specify “spapp”. Select OK. You will be redirected to the “Apps” page.
Select SharePoint and Office Store –> Configure Store Settings. If you don’t want your end users to be able to get apps from the SharePoint store, select “No”. It is not a good idea to let end-users install the apps. They can request the apps and admins can install it. Select OK. - We are now ready to test purchasing the apps from SharePoint store. For testing we will add a free apps to our default SharePoint site collection. Open your browser and navigate to http://sharepoint site that we created in the first part of this article. Select Settings –> Add an App.
You will see the “Your Apps” page. Select “SharePoint Store” from the Quick Launch menu.
You will see “Featured Apps”. Let’s add one of the free app to our SharePoint site. The app I have selected is “World Clock and Weather”. Selecting this application will show you the details of this app. Select “REQUEST IT”. You will see the “App Request” form. Select the desired option and select “Request”. The request will be accessible in the “App Catalog” site we earlier created.
- Go to the “App Catalog” we created earlier at http://sharepoint/sites/appcatalog. Select “App Requests” from Quick Launch menu. You will see the “App Requests” page. Select the “Edit” icon. Select “Approved” from the “Status” drop-down and select “Save”.
Select “Click here to view app details and purchase or manage licenses”. You will be taken to the app details page. Select “ADD IT”. At this time, you will be required to sign-in to the Microsoft Office Store web site. Once you are signed in, you will be displayed a message while your application details is loaded. Once that process is complete, you will see the confirmation message. Keep the option that says add the app to app catalog and select “Return to Site”.
After that you will see your site content screen. The app will be downloaded to your App Catalog site. - Let’s go back to our default site collection from where the app was requested. Select “Add Lists, libraries, and other apps”. You will see “Your Apps” page. The “World Clock and Weather” app will be displayed in the “Apps you can add” section . Click on the app icon and select “Trust It” when prompted. The app will be added to your site. It may take few seconds to complete. Once ready, take your mouse on the app icon. In the Status Bar you will see a redirect URL.
Click on the app icon. If you are testing this app on the server, you may get a login prompt. Specify user name and password and select “OK”. After that point, I was actually thinking to see the app but I got a JavaScript error. Do notice the URL of this app in the address bar. Good news is now you can add app to your SharePoint 2013 site
REMOVING APPS
In order to remove an app from your SharePoint site, follow these steps:
- Select Settings –> View Site Contents. This will display the Site Contents page.
- Scroll down and select the app you want to remove. You will see “…” link for the app. Click on it. Wait until it’s information is loaded. Once app information appears, select the “…” icon again and select “Remove” from the menu. Select “OK: at the prompt. The status under the app will be updated to “We’re removing your app…”. Once the app is removed, it will be removed from the interface as well.
MANAGING APPS FROM APP CATALOG
You can manage app from the app catalog site as well. Follow these steps to manage app in app catalog site:
- Go to your app catalog site which in my case is http://sharepoint/sites/appcatalog. Select Settings –> View Site Contents from the menu. Hover your mouse over the app you want to manage and select the more information “…” link. Once the app information is displayed, select the more information link “…” again. Available options include Deployment, Permissions, and Remove.
- Let’s deploy this application to our http://sharepoint site since we have already removed it form there. Select “Deployment” from the app information menu. You will see “Manage App Deployments” page. Specify the following information on this page:
Enter a site collection to deploy to: http://sharepoint
Select Add. Wait until this URL is added.
Scroll down in the page. In Managed Paths option, keep the default value selected.
In Site Template, select “Blog” or any other site template and select “Add”. Select OK. Select “Trust It” when prompted and wait for the operation to complete. You will be redirected to the “Site Contents” page once this process is complete. - In the browser, navigate to http://sharepoint site. I was expecting to see this app in my site but it was not there. I followed instructions in step #14 above to add this app to my site.
TROUBLESHOOTING
You may receive the following errors when working with the App Management Service.
- Sorry, apps are turned off. If you know who runs the server, tell them to turn on the App Management Shared Service
Possible causes of this error include incorrect configuration of service applications mentioned in the article. I recommend deleting the existing App Management Service application and creating it using SharePoint 2013 Management Shell. You may also be missing the App Domain and App Prefix settings in the “Configure App URLs page”. Make sure to configure a correct URL for apps using the information provided above. - The Corporate Curated Gallery Settings feature is not activated on current web application
You may notice this error in the SharePoint log files. This can be resolved by activating the CorporateCuratedGallerySettings feature.
stsadm –o activatefeature -name "CorporateCuratedGallerySettings” -url "http://<url of your site>” - Corporate Catalog has not been created for the current Web application
You may notice this error in the SharePoint log files. This can be resolved by creating the App Catalog site mentioned above in the article.
Hope this article helps you in configuring the app management service which is an interesting feature in SharePoint 2013! I would like to thank Alexey Shcherbachev on Microsoft TechNet forum for helping me out in resolving the “Sorry, apps are turned off” error. The TechNet SharePoint 2013 forum for developers is available at http://social.technet.microsoft.com/Forums/en-US/sharepointdevpreview/threads.
No comments:
Post a Comment