CloudShare is giving pre-configured SharePoint 2013
environment for trial purpose for 14 days. But the environment does not have
app domain configuration. It does have VS 2012 installed. For developer
especially if you are interested to develop SharePoint 2013 apps, you need to
have an environment where you can develop and test.
I am using CloudShare environment to develop and test
SharePoint 2013 apps. I want to share the steps I used to configure the environment and also for myself for future reference. Below are the steps:
1.
Create A record to your DNS as shown below
a.
Open DNS Manager
i.
Right click on Forward Lookup Zones shown below
ii.
Select Primary Zone
iii.
To all DNS Servers running on domain controller
in this domain
iv.
Enter Zone name. Such as mmasood.com
v.
Click Finish
b.
Create Host (A) record
i.
Select newly created Zone from left pane and on right pane right click and select New Host (A) record
ii.
Provide IP address of your SharePoint Server
iii.
Create CNAME as shown below
2.
Open command prompt or powershell window and
ping abc.apps.mmasood.com as we have configured *.apps.mmasood so just try
replace any character or with any word.
3.
Now you have configured DNS for the server
4.
Browse Central Admin > Manage Service
Applications
5.
Create App Management Service application and
provide SPFarm account when creating app pool for this service app.
6.
Run below powershell command
$sa = Get-SPServiceApplication | where-object { $_.displayname -eq "App Management Service" }
$subsservice = New-SPSubscriptionSettingsServiceApplication –ApplicationPool $sa.ApplicationPool –Name "Subscription Settings Service" –DatabaseName "SubscriptionSettingsDB"
$proxySubscriptionService = New-SPSubscriptionSettingsServiceApplicationProxy –ServiceApplication $subsservice
Get-SPServiceInstance | Where-Object { $_.typename -eq "App Management Service" } | Start-SPServiceInstance
Get-SPServiceInstance | Where-Object { $_.typename -eq "Subscription Settings Service" } | Start-SPServiceInstance
Set-SPAppDomain "apps.mmasood.com"
Set-SPAppSiteSubscriptionName -Name "app" -Confirm:$false
$sa = Get-SPServiceApplication | where-object { $_.displayname -eq "App Management Service" }
$subsservice = New-SPSubscriptionSettingsServiceApplication –ApplicationPool $sa.ApplicationPool –Name "Subscription Settings Service" –DatabaseName "SubscriptionSettingsDB"
$proxySubscriptionService = New-SPSubscriptionSettingsServiceApplicationProxy –ServiceApplication $subsservice
Get-SPServiceInstance | Where-Object { $_.typename -eq "App Management Service" } | Start-SPServiceInstance
Get-SPServiceInstance | Where-Object { $_.typename -eq "Subscription Settings Service" } | Start-SPServiceInstance
Set-SPAppDomain "apps.mmasood.com"
Set-SPAppSiteSubscriptionName -Name "app" -Confirm:$false
7.
Now create SharePoint 2013 App project and
deploy it.
8. When you deploy you might see “Installing …” in visual studio 2012 like shown below
Let the VS deploy your app.
9. You should see similar result
You can see the url of the app
with app-prefix and app domain configured above. Hope this will help and save your time.
I get a number of authentication prompts after I click on a deployed app in a SharePoint Cloudshare VM - after 3 prompts it gives me an empty page? Do you have any idea what can be the problem?
ReplyDeleteTry disabling Loopback thing. Go to your registry and create "DisableLoopbackCheck" (if not exists) at:
DeleteHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
with value 0
Thanks Masood, for this excellent post !! Appretiate your efforts for sharing this.
ReplyDeleteFurther I came across following link:
http://support.microsoft.com/kb/896861
This says that disabling the loopback check (DisableLoopbackCheck) is a less-recommened approach, but we can obviously use it for Dev environments. This link also mentiones other approach, which I am assuming would be recommened one and could be considered for production environments.
Regards,
Anwar