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.
I have followed your instructions.Everything looks fine.But if i want to added the app i got the message "Everything is fine, but we had a small problem getting your license. Please go back to the SharePoint Store to get this app again and you won't be charged for it."... Do you have a idea?
ReplyDeleteI have followed your instructions.But if i want to added the app i got a error message "Everything is fine, but we had a small problem getting your license. Please go back to the SharePoint Store to get this app again and you won't be charged for it.".. Do you have a idea?
ReplyDeleteMarkus: Did you check the SharePoint log and Windows log? Any information there? Did you try to restart? Let me know.
ReplyDeleteThanks for the guide, it help me to understand some missing concepts, and adapt it to create the same using Host-named site collections instead of Path based.
ReplyDeleteI've used an A Host on my DNS so I can access it from the Host OS (outside my virtual environment) and 2 separated lookup zones (sp2013Web.local, sp2013apps.local).
My app catalog is called AppCatalog.sp2013Web.local and all my downloaded, deployed apps will render from app-hash.sp2013apps.local... really cool indeed.
I've got from time to time the same error as @Markus, but I realized it was mainly connectivity timeout issues with the store as the Log didn't showed up a thing, a simple F5 refresh fixed it.
I get same error over and over again, with diff apps
ReplyDelete"Everything is fine, but we had a small problem getting your license. Please go back to the SharePoint Store to get this app again and you won't be charged for it."
tried different apps same and it show error fats so i don't think its because of latency of my network!
can you help me out any idea what else might cause that?
Did you check for errors in SharePoint 15 hive? Are you sure you are connected to Internet?
Deleteyou need to use different account rather then System account..
Deletehttp://blog.technock.net/2013/03/sharepoint-2013-apps-everything-is-fine.html
Is it possible or advisable to use Managed Service Accounts for the apps services? It appears that the answer is no, because SQL logins cannot be Managed Service Accounts as far as I can tell.
ReplyDeleteChris:
DeleteYes you are right, SharePoint service apps can only use a domain account.
--Nauman.
Awesome post, Ran into an issue installing a 2nd app to test with. It says "We're adding your app" but it's been like this for 2 hours.
ReplyDeleteGreat Post, but I'm running into an issue. I'm installing my second app to test from the SharePoint store. The App says "we're adding your app" but it has been stuck on this for 2 hours. Any ideas?
ReplyDeleteBinu: Sorry for the delayed response. Did you get this issue resolved? I would check for errors in event log and SharePoint log in the 15 hive.
Delete--Nauman.
Ever seen Page cannot be displayed when deploying any App?
ReplyDeleteToby: It is possible that the app couldn't be deployed successfully. Did you try to deploy it to a different site? Also, there should be some information in Event Log or SharePoint log.
ReplyDeleteToby, I was seeing the same error and realized that I missed the point about the App URL settings. So, I have a site called "client.mycompany.com" and I set up the Apps site to "clients.mycompany.com" and the App URL to "spapps". In DNS, I set up the alias to point *.apps to "clients.mycompany.com", which didn't work because it was not putting the apps under "*.apps". I had to change the Apps site to "apps.mycompany.com" and then it all worked! Hope this helps.
ReplyDeleteHi Nauman,
ReplyDeleteThanks buddy for this beautiful article, my problem is different thn others above here, i couldnt really follow your steps correctly in sp management shell ...
$proxySubSvc = New-SPSubscriptionSettingsServiceApplicationProxy –ServiceApplication $appSubSvc
$appAppSvc = New-SPAppManagementServiceApplication -ApplicationPool $appPoolAppSvc -Name AppServiceApp -DatabaseName AppServiceDB
$proxyAppSvc = New-SPAppManagementServiceApplicationProxy -ServiceApplication $appAppSvc
these commands didnt work, dont know why and how but it says argument or syntax error ..
once i try to start without these commands i get error in configure apps URL and it says sorry something went wrong .. :(
any idea if i am doing something wrong.
i am useing sp foundation with SQL server but on same system ..
Hello Malik:
DeleteThanks for the comment. The error might be related to copying and pasting the PowerShell commands. Please try to write the commands directly in the PowerShell and let me know if it resolves the issue.
Thanks,
Nauman.
So, this just got complicated for me. I followed the setups and everything went 100%!
ReplyDeleteBut when I go to my other sites and add the downloaded app, I get
This page can't be displayed
•Make sure the web address http://apps-a667cfc03b81c9.apps.ms.local is correct.
What if we are not using a public FQDN as local instead of global? For example, my domain is setup for ms.local and I can see this works for a domain ".com". When i try to add my domain name as an A record, it adds mycompany.com.me.local.
I cannot convert my domain over without rebuilding it, so what do you think my work around should be here?
Hi Nauman,
ReplyDeleteI did the steps as you stated exactly and everything went GREAT. Big thanks.
I do have one DNS issue that I need some help on.
My domain in my company is ms.local, not a ".com".
Therefore when I try to add a app on another site,
1. It leaves the domain or .com allocated in Alternative ACcess Mappings and goes to
http://apps-a667cfc03b81c9.apps.ms.local/admin/sales/InvoicingManagerStarterPack/Pages/Default.aspx?SPHostUrl=http%3A%2F%2Fios%2Emekong%2Dsoft%2Ecom%2Fadmin%2Fsales&SPLanguage=en%2DUS&SPClientTag=4&SPProductNumber=15%2E0%2E4420%2E1017&SPAppWebUrl=http%3A%2F%2Fapps%2Da667cfc03b81c9%2Eapps%2Ems%2Elocal%2Fadmin%2Fsales%2FInvoicingManagerStarterPackit
Then it gives me this error:
This page can't be displayed
•Make sure the web address http://apps-a667cfc03b81c9.apps.ms.local is correct.
•Look for the page with your search engine.
•Refresh the page in a few minutes.
When I did the PING test at the beginning of the site, it worked perfectly.
What would be an appropriate DNS workaround here because I cannot change my domain name now, it would be too much work to accommodate the Apps site.
I really appreciate some direction here because I feel like I am 99% done with this, just a little more to make this 100%.
Hello Philip:
DeleteI am glad you found this article useful. About the domain part: are you using more than one domain in your company and is your SharePoint site accessed from outside as well? I think you can make it work internally by making your DNS server primary server in client computer. However, I need to know little bit more details first :-). Let me know.
Thanks,
Nauman.
Hi nauman
ReplyDeleteThanks for the greate article . Now I can add apps but when I go to app page I dont see the ribbon and the design is not rendering in a proper way for example the corporate news app I am not able to do any configuration to it or even to see the news list to add news . Any idea ?
Sorry for the delayed response. Is it possible for you to provide a screenshot?
DeleteI believe this is because it launches to the app site, not in an iframe inside the site.
DeleteI configuered everything and was able to buy some apps from the store.
ReplyDeleteAs soon as I want to add them on a Site / to the Catalog Site, I get the message "You can't add this app here."
I don't know if I configured it correctly.
I have two load balanced web front ends and an application server which hosts the central administration and of course the service applications. The CA server is the only one with internet access.
I configured the DNS Alias to point on the load balancer address. Is that correct or does it have to point on the CA server?
Hi Nauman, awesome article. I did everything here but im still getting the "Sorry, we can't seem to connect to the SharePoint Store. Try again in a bit."
ReplyDeletehi Nauman, awesome article, I did everything in here but im still getting the "Sorry, we can't seem to connect to the SharePoint Store. Try again in a bit." message, any advice?
ReplyDeleteThanks Ricardo. Are you still experiencing this issue? You may want to check your DNS and Internet connection. Please let me know.
DeleteHi Numan,
ReplyDeleteI have configured all steps and I can add apps. But in few apps I am getting issue like "sorry this app is not supported on your server " Please help
Thanks
Amardeep Rana