As we know SharePoint 2013 has introduced an App Model approach and everyone is eager to develop the app. Using this article, I am explaining the procedure to include App configuration as well as App development.
Section 1: Configuring App in SharePoint 2013
Section 1: Configuring App in SharePoint 2013
- Create DNS entry for App
Go to Administrative Tools then click on "DNS":
See the following screen:
Right-click then select "Create New Alias(CName)". Refer to the following screen:
Select "same as parent" as in the following screen:
Your final screen should be as in the following, click "Ok":
- DisableLoopbackCheck in regedit (to avoid authentication prompt)
Open the Registry window:
Go to "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa" and right-click and select:
Rename "DisableLoopbackCheck" and right-click on "modify" and change the value to "1". The final output should look as in the following:
- Check timer job to check spadmin & sptimer services
PowerShell script:
net start spadminv4
net start sptimerv4
- Set App Domain
PowerShell script:
Set-SPAppDomain "<Domain name>"
- Check Appservices and Subscription services
PowerShell script:
Get-SPServiceInstance | where{$_.GetType().Name -eq "AppManagementServiceInstance" -or $_.GetType().Name -eq "SPSubscriptionSettingsServiceInstance"} | Start-SPServiceInstance
And ensure service:
Get-SPServiceInstance | where{$_.GetType().Name -eq "AppManagementServiceInstance" -or $_.GetType().Name -eq "SPSubscriptionSettingsServiceInstance"}
- Configuring SPSubscriptionService
PowerShell script:
$account = Get-SPManagedAccount "<Farm Account>"
$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
- Configure AppManagement ServiceInstance
PowerShell script:
$appAppSvc = New-SPAppManagementServiceApplication -ApplicationPool $appPoolAppSvc -Name AppServiceApp -DatabaseName AppServiceDB
$proxyAppSvc = New-SPAppManagementServiceApplicationProxy -ServiceApplication $appAppSvc
After performing step 6 and 7, In Central Administration site go to Application Management -> Manage Service Applications. You will able to see:
- Configure tenant for hosting SharePoint 2013 Apps
PowerShell script:
Set-SPAppSiteSubscriptionName -Name "app" -Confirm:$false
- Configure App URL in Central Administration
In Central Administration site go to "Apps" -> "Configure App Url's":
Section 2: Develop SharePoint Hosted App using VS2012
After completing Section 1 of this article, we are ready for creating apps in SharePoint 2013. I will explain the procedure for creating a hello world app in SharePoint 2013.
After completing Section 1 of this article, we are ready for creating apps in SharePoint 2013. I will explain the procedure for creating a hello world app in SharePoint 2013.
- Open Visual Studio 2012, create a new project then select the language C# then the template "SharePoint Apps". Give it the name "HellowWorldApp". Click "Ok".
- Select "SharePoint Hosted App" and click on "Finish":
- The folder structure should look as in the following:
- Click on "Scripts\App.js". Add some text in it as in the following:
- Click on "Deploy" to deploy the solution. You are done with your first SharePoint 2013 App.
Section 3: Verify your app
- Open the site where your App is deployed. For example "Team Site". Click on "Site Action" - "Site Contents":
- Under Site Content, you will able to see the app you created, "HellowWorldApp". Click on "HellowWorldApp".
- Here is my app:
You can learn more about the basics of Apps from the MSDN link:
http://msdn.microsoft.com/en-us/library/fp179930.aspx
Hope you liked my Article... happy Learning.
http://msdn.microsoft.com/en-us/library/fp179930.aspx
Hope you liked my Article... happy Learning.
Comments