0

When attempting to add an app to a host named site collection, I get the following error:

Sorry, apps are turned off. If you know who runs the server, tell them to enable apps

the message displayed when attempting to add a sharepoint store app.

apps are turned on for the web application, so I don't understand why I am getting this error. I can't turn on what is already turned on.

I can acquire apps through central administration, which is on the same web application.

does anyone know how to enable apps for a site collection?

sharepoint 2013 sp1 enterprise, windows server 2012 r2, sql server 2012, farm

  • Can you check log and see any errors something like The site subscription name must exist to complete this operation – Amal Hashim Nov 7 '14 at 15:23
2

Try this powershell script:

# Ensure that the spadmin and sptimer services are running  
Write-Host  
Write-Host "Ensure that the spadmin and sptimer services are running" -ForegroundColor     Yellow  
net start spadminv4  
net start sptimerv4  

# Create your isolated app domain by running the SharePoint Management Shell as an     administrator and typing the following command.  
Write-Host  
Write-Host "Create your isolated app domain by running the SharePoint Management Shell   as an administrator and typing the following command." -ForegroundColor Yellow  
$appdomain = Read-Host "Your App Domain Name"  
Set-SPAppDomain $appdomain  

# Ensure that the SPSubscriptionSettingsService and AppManagementServiceInstance    services are running   
Write-Host  
Write-Host "Ensure that the SPSubscriptionSettingsService and    AppManagementServiceInstance services are running." -ForegroundColor Yellow  
Get-SPServiceInstance | where{$_.GetType().Name -eq "AppManagementServiceInstance" -or    $_.GetType().Name -eq "SPSubscriptionSettingsServiceInstance"} | Start-SPServiceInstance  

# Verify that the SPSubscriptionSettingsService and AppManagementServiceInstance services are running   
Write-Host  
Write-Host "Verify that the SPSubscriptionSettingsService and  AppManagementServiceInstance services are running." -ForegroundColor Yellow  
Get-SPServiceInstance | where{$_.GetType().Name -eq "AppManagementServiceInstance" -or    $_.GetType().Name -eq "SPSubscriptionSettingsServiceInstance"}  

# Specify an account, application pool, and database settings for the     SPSubscriptionService and AppManagementServiceInstance services   
Write-Host  
Write-Host "Specify an account, application pool, and database settings for the   SPSubscriptionService and AppManagementServiceInstance services." -ForegroundColor Yellow  
$login = Read-Host "The login of a managed account"  
$account = Get-SPManagedAccount $login   
$appPoolSubSvc = New-SPServiceApplicationPool -Name SettingsServiceAppPool -Account     $account  
Write-Host "SettingsServiceAppPool created (1/6)" -ForegroundColor Green  
$appPoolAppSvc = New-SPServiceApplicationPool -Name AppServiceAppPool -Account    $account  
Write-Host "AppServiceAppPool created  (2/6)" -ForegroundColor Green  
$appSubSvc = New-SPSubscriptionSettingsServiceApplication –ApplicationPool    $appPoolSubSvc –Name SettingsServiceApp –DatabaseName SettingsServiceDB   
Write-Host "SubscriptionSettingsServiceApplication created  (3/6)" -ForegroundColor   Green  
$proxySubSvc = New-SPSubscriptionSettingsServiceApplicationProxy –ServiceApplication     $appSubSvc  
Write-Host "SubscriptionSettingsServiceApplicationProxy created  (4/6)" -  ForegroundColor Green  
$appAppSvc = New-SPAppManagementServiceApplication -ApplicationPool $appPoolAppSvc -  Name AppServiceApp -DatabaseName AppServiceDB  
Write-Host "AppManagementServiceApplication created  (5/6)" -ForegroundColor Green  
$proxyAppSvc = New-SPAppManagementServiceApplicationProxy -ServiceApplication   $appAppSvc  
Write-Host "AppManagementServiceApplicationProxy created  (6/6)" -ForegroundColor Green  

# Specify your tenant name   
write-host  
Write-Host "Set AppSiteSubscriptionName to 'app'" -ForegroundColor Yellow  
Set-SPAppSiteSubscriptionName -Name "app" -Confirm:$false  
Write-Host "AppSiteSubscriptionName set" -ForegroundColor Green  

# Disable the loopbackcheck in the registry  (optional) usually only done in DEV
Write-Host "Disable the loopbackcheck in the registry" -ForegroundColor Yellow  
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Lsa\" -Name   "DisableLoopbackCheck" -PropertyType DWord -Value 1 

Write-Host "Completed" 
  • Disable the loopbackcheck? Really? – Christoffer Nov 7 '14 at 7:31
  • really.. To ensure all the calls initiated from the server itself do not result into any HTTP 401 errors in IIS logs as suggested by MS. thx for the down vote tho :) support.microsoft.com/kb/896861 – Michael Colbs Nov 7 '14 at 14:45
  • No offense in the downvote, but Microsoft put the security feature there for a reason. harbar.net/archive/2009/07/02/… – Christoffer Nov 7 '14 at 15:05
  • Usually something I do in dev environments, commented the script – Michael Colbs Nov 7 '14 at 15:16
  • i agree that the disable loopbackcheck should not have been altered. I clearly had other troubles with my site. I opened a ticket with Microsoft which resulted in rebuilding the app store environment, but in looking back at it, I think my problems were due to 2 specific problems. somehow the app domain url was missing - don't ask - I know I set it, but then when I checked again it was missing. setting it resolved part of the problem. the other part was misconfigured dns. those 2 corrections enabled apps for the site collection. – tony bonn Nov 7 '14 at 19:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.