SharePoint 2013 Apps Model is very important developer. as SharePoint geek i find SharePoint app Model the most interesting learning topic in SharePoint 2013. to start development on SharePoint app model you have to configured app store and App on your SharePoint machine. default SharePoint management and App Catalog,App Store is not enabled in SharePoint. to enable Apps on you development machine or Production server you have activated few Service Applications from CA and Powershell.
How to enable SharePoint 2013 App.
1 Goto SharePoint 2013 Central Administrations.
3 under System Setting Go to Manage services on server.
4 Server page find App Management Service Click on Start button and wait to ensure service will start.
5 Enable next Service on same page Microsoft SharePoint Foundation Subscription Settings Service click on on Start.
By default SharePoint 2013 App Management Service and Microsoft SharePoint Foundation Subscription Proxy is not install on service.
Configure the Subscription Settings service application with PowerShell.
Important for developers
If you will try to deploy a SharePoint-hosted apps on your SharePoint 2013 workstation with by default sharepoint 2013 installation visual studio will not gives you error.
PowerShell To Create Isolated app domain.
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
Or To Configure App Domain without power shell i find great article by MVP Mirjam's on her blog. Click here.
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 Pink
$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
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 "successfully Completed".
Download Complete PowerShell.
After that ensure that Service Application Proxy has been created and running file.
- Go to SharePoint 2013 Central Administrations.
- Under Application Management Click on Manage service applications.
- Ensure see both application with Proxy is running.
- In Central Administration, click Apps.
- On the Apps page, click Configure App URLs.
- In the App domain box, type the isolated domain that you created for hosting apps.
- For example, ContosoApps.com or Contoso-Apps.com.
- In the App prefix box, type a name to use for the URL prefix for apps.
- For example, you could use “apps” as the prefix so that you would see a URL for each app such as “apps-12345678ABCDEF.sharepointloveapp.com”. The following illustration shows the Configure App URLs page after you have filled in the App domain and prefix.
#Set-SPAppDomain
Set-SPAppDomain sharepointloveapp.com
#Set-SPAppSiteSubscriptionName -Name "app" -Confirm:$false
Set-spappSiteSubscriptionName -Name "app"
- 1 In Central Administration, on the Apps page, in the App Management section, click Manage App Catalog.
If no App Catalog exists for the farm, the Web Application page opens, so you can select a web application. - On the Web Application page, select the web application for which you want to create a catalog.
- In the App Catalog Site section, select Create a new app catalog site, and then click OK.
- On the Create App Catalog page, in the Title box, type a title for the App Catalog site.
- In the Description box, type the description for the site.
- In the URL box, fill in the URL to use for the site.
- In the Primary Site Collection Administrator section, in the User Name box, type the user who will manage the catalog.
- Only one user name can be entered. Security groups are not allowed.
- In the End Users section, in the Users/Groups box, type the names of the users or groups that you want to be able to browse the catalog.
- Added users or groups have read access to the App Catalog site. You can add multiple user names and security groups. Users must be added as End Users to be able to browse the App Catalog from their site collections.
- In the Select a quota template list box, select the quota template to use for the site.
- Click OK.
Enjoy your Apps :)
By Usama Wahab Khan
Reference
http://msdn.microsoft.com/en-us/library/fp179923%28v=office.15%29.aspx#SP15appdevonprem_bk_configure
http://technet.microsoft.com/en-us/library/fp161234.aspx
http://technet.microsoft.com/en-us/library/fp161236(office.15).aspx
http://blogs.msdn.com/b/tomvan/archive/2012/11/20/prepare-sharepoint-2013-server-for-app-development-create-an-isolated-app-domain-powershell-script.aspx
0 comments:
Post a Comment