I recently worked on a case where customer was facing issue when trying to add Apps on Host Header Site collection. He does not face any issues while trying to add apps on site collection created without host header mode.
Here are the steps to reproduce the issue, these steps can also help you in configuring HH mode site collection in case you were not sure on how to do it :) (These steps will also work on SharePoint 2007)
1. Create a New web application, In my case it is http://sps2013-a.com
2. $Sub = New-SPSiteSubscription (This cmmdlet will help in generating new SPSite Subscription)
3. New-SPSite http://test.walia.com -OwnerAlias walia\administrator -HostHeaderWebApplication http://sps2013-a -language 1033 -sitesubscription $sub
The above command will create a new Site collection in HH mode and assign a unique subscription ID(We generated this ID in Step 2)
4. new-spsite -url http://sps2013-a/sites/tadminsite -template TENANTADMIN#0 -owneralias walia\administrator -AdministrationSiteType tenantadministration -language 1033 -sitesubscription $sub
(The above command will create a new Tenant Administration site and will tie the HH mode site collection to it,We assign it the same Subscription ID of the HH mode site)
5) Browse to the Site http://test1.walia.com
6) Click on Site Contents and try to add App from App Store
You will receive "Sorry, apps are turned off. If you know who runs the server, tell them to enable apps"
Following message is logged in ULS logs
01/02/2013 15:42:10.29 w3wp.exe (0x0A0C) 0x03E0 SharePoint Foundation App Deployment adysh High The site subscription name for site http://test.walia.com does not exist. The site subscription name must exist to complete this operation. 19fdf09b-7152-3086-ee69-b85fa6faa86c
1) Browse to Tenant Administration Site of the HH mode Site collection
2) Create App Catalog for Tenant by clicking on Manage App Catalog
Note – Every Tenant Admin will require a App Catalog(Make sure Self site creation is enabled in order for App Catalog to get created)
3) $Sub = Get-SPSiteSubscription http://hhmodeSite (This CMDlet will help in fetching the subscription ID of the HH mode site collection)
Set-SPAppSiteSubscriptionName -Name "Name for Subscription" -SiteSubscription $Sub
We need to run the above command in order to set the unique name for domain under which these apps will run.More details can be found under http://technet.microsoft.com/en-us/library/jj219503.aspx
Feel free to post comments if you have any confusion regarding any of the steps.
Nice work by you can your team Harmeet
Did you create app catatalog for every tenant ? or it's possible to have one for all, like http://hhmodesite/apps for example ?
For : Set-SPAppSiteSubscriptionName -Name "Name for Subscription" -SiteSubscription $Sub
You perform this command for one tenant but for other ?
What doesn't appear to be clear in any documentation released by Microsoft is the value for the actual -Name parm when setting the Set-SPAppSiteSubscriptionName. Can this be any unique name for each tenant or does it somehow have to relate to something generated when the subscription is created?
thanks for any help
-Name can be anything
I have Problem with Sharepoint Store. Cant Add Apps to on-premise Site from it. It says "Sorry, we can't seem to connect to the SharePoint Store. Try again in a bit". Although i have done all things required and suggested by you and other major techguru's.