如果没有Enable app,打开app store的时候出出现错误:

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

要开启他,首先要有一个App的DNS,如下新建,如果管理工具里面没有DNS,那么到feature中增加。

Control Panel\System and Security\Administrative Tools

右击Forward Lookup Zones

点New Zone, 一直点Next,然后输入一个域名字。

然后右击新建的域,然后点New Alias

如下图设置

DNS新建好之后,新建APP Management Service和Subscription Setting Service Application

然后确保两个Service是运行的,如下

总之运行下面的脚本就可以开启了

$appManagementService = Get-SPServiceInstance | where {$_.TypeName -like ‘App Management Service‘}
if($appManagementService.Status -ne ‘Online‘) {
Write-Host ‘Starting App Management Service‘
Start-SPServiceInstance $appManagementService | Out-Null
}
else{
Write-Host ‘App Management Service was already started‘
}
# wait for App Management Service to start”
while ($service.Status -ne ‘Online‘) {
# delay 5 seconds then check to see if service has started sleep 5
$service = Get-SPServiceInstance | where {$_.TypeName -like ‘App Management Service‘}
} $subscriptionSettingsService = Get-SPServiceInstance | where {$_.TypeName -like ‘Microsoft SharePoint Foundation Subscription Settings Service‘}
if($subscriptionSettingsService.Status -ne ‘Online‘) {
Write-Host ‘Starting Subscription Settings Service‘
Start-SPServiceInstance $subscriptionSettingsService | Out-Null
}
else{
Write-Host ‘Subscription Settings Service was already started‘
}
while ($service.Status -ne ‘Online‘) {
# delay 5 seconds then check to see if service has started sleep 5
$service = Get-SPServiceInstance | where {$_.TypeName -like ‘Microsoft SharePoint Foundation Subscription Settings Service‘}
} $appManagemetnServiceApplicationName = ‘App Management Service‘
$appManagementServiceApplication = Get-SPServiceApplication | where {$_.Name -eq $appManagemetnServiceApplicationName}
# create an instance App Management Service Application and proxy if they do not exist
if($appManagementServiceApplication -eq $null) {
Write-Host ‘Creating App Management Service Application‘
$pool = Get-SPServiceApplicationPool ‘SharePoint Web Services Default‘
$appManagementServiceDB= ‘Sharepoint_AppManagementServiceDB‘
$appManagementServiceApplication = New-SPAppManagementServiceApplication `
-ApplicationPool $pool `
-Name $appManagemetnServiceApplicationName `
-DatabaseName $appManagementServiceDB
Write-Host ‘Creating App Management Service Application Proxy‘
$appManagementServicApplicationProxy = New-SPAppManagementServiceApplicationProxy `
-ServiceApplication $appManagementServiceApplication
}
else{
Write-Host ‘App Management Service Application already exist‘
} $subscriptionSettingsServiceApplicationName = ‘Subscription Settings Service Application‘
$subscriptionSettingsServiceApplication = Get-SPServiceApplication | where {$_.Name -eq $subscriptionSettingsServiceApplicationName}
# create an instance Subscription Service Application and proxy if they do not exist
if($subscriptionSettingsServiceApplication -eq $null) {
Write-Host ‘Creating Subscription Settings Service Application‘
$pool = Get-SPServiceApplicationPool ‘SharePoint Web Services Default‘
$subscriptionSettingsServiceDB= ‘Sharepoint_SiteSubscriptionSettingsServiceDB‘
$subscriptionSettingsServiceApplication = New-SPSubscriptionSettingsServiceApplication `
-ApplicationPool $pool `
-Name $subscriptionSettingsServiceApplicationName `
-DatabaseName $subscriptionSettingsServiceDB
Write-Host ‘Creating Subscription Settings Service Application Proxy‘
$subscriptionSettingsServicApplicationProxy = New-SPSubscriptionSettingsServiceApplicationProxy `
-ServiceApplication $subscriptionSettingsServiceApplication
}
else{
Write-Host ‘Subscription Settings Service Application already exist‘
}
Set-SPAppDomain ‘apps.xxx.com‘ -Confirm:$false Set-SPAppSiteSubscriptionName -Name ‘app‘ -Confirm:$false

最后到CA点Apps,点Configure App Urls,就可以看到

当你点app store的时候,其实并没有离开你的站点。

最后当添加的时候出现错误

"Sorry, this app is not supported on your server"

需要去CA激活一个Feature

1. Browse to Central admin

2. Click on ‘Application Management‘

3. Click ‘Manage web applications‘

4. Select the web application which hosts the site you are trying to install the app to

5. Click ‘Manage Features‘

6. ‘Apps that require accessible internet facing endpoints‘ should be deactivate. Click ‘Activate‘

最新文章

  1. java使用Executor(执行器)管理线程
  2. .net线程池
  3. JVM内存管理------垃圾搜集器参数精解
  4. 删除.gitignore中的在version control中的文件
  5. IOS设计模式六大法则
  6. iOS 并发:NSOperation 与调度队列入门(1)
  7. BZOJ 1570: [JSOI2008]Blue Mary的旅行( 二分答案 + 最大流 )
  8. bitmap 加载的时候出现OOM,nullpointer
  9. Modeling -> Mixamo auto rigging -> UE4 retargeting
  10. MySQL Study之--MySQL schema_information数据库
  11. 【python学习笔记】5.条件、循环和其他语句
  12. MySQL备份与恢复之percona-xtrabackup实现增量备份及恢复 实例
  13. centos7如何安装部署Zabbix
  14. HashMap底层实现原理(JDK1.8)源码分析
  15. BZOJ.2002.Bounce 弹飞绵羊(LCT)
  16. 第二届CCF软件能力认证
  17. what is bitcoin
  18. 【HAOI2014】贴海报
  19. impdp导入expdp导出数据库实例
  20. [iOS] Edit / Memo 原生控件才提供拼字检查

热门文章

  1. 小明学习代码审计writeup
  2. 4 LinkedList
  3. 用单元测试来调试SilverFish AI
  4. Android中代码优化
  5. Centos7.4 下cobbler安装及配置
  6. 数学建模python matlab 编程(指派问题)
  7. kettle在linux下面用于shell脚本执行:转换或者作业
  8. 学一学Transfomer
  9. .NET Core WebApi中返回 json 数据首字母大小写问题
  10. Django-Form组件-forms.ModelForm