Sunday, October 26, 2014

Configuring SharePoint 2013 app environment


For SharePoint 2013 we need one domain which you will use for apps in your environment.

You must configure a new name in Domain Name Services (DNS) to host the apps. To help improve security, the domain name should not be a subdomain of the domain that hosts the SharePoint sites.

Here am using existing domain in my machine and going to create alias name for the existing domain.

To create a forward lookup zone for the app domain name

1. Open DNS manager --> right click on Forward lookup zones --> click New Zone




2. In the new zone wizard, click on next

3. In the zone type page, select 'Primary zone' and click next.



4. In the Active Directory Zone Replication Scope page, select To all DNS servers in this domain and then click Next.



5. In the Zone Name page, in the Zone name box type the name for your new app domain name, and then click Next.



6. On the Dynamic Update page, select Do not allow dynamic updates and then click Next -> Finish.




To create a wildcard Alias(CNAME) record for the new domain name

8. Open DNS Manager --> under computer name expand Forward Lookup Zones --> Select newly created domain.

9. Right Click on the domain name and then click New Alias (CNAME).


10. In the New Resource Record dialog box, in the Alias name (uses parent domain if left blank) box, type *.

11. The Fully qualified domain name (FQDN) box displays *. followed by the domain name that you created for apps. 

12. Next to the Fully qualified domain name (FQDN) for target host box, type the FQDN of the server that hosts the SharePoint sites.



Click OK.

Create the App Management and Subscription Setting Service Applications:

You have to add two services which are required to Install and Configure Apps on SharePoint 2013.

1. App Management Service
2. Microsoft SharePoint foundation Subscription Settings Service

we have to check these two services are running or not, if not need to start these two services.
Go to Central Admin -> Click Manage Services on Server under System Settings.



Make sure that the status of App Management Service and Microsoft SharePoint Foundation Subscription Settings Service are listed as Started.

By default App Management Service started but not  Microsoft SharePoint Foundation Subscription Settings Service.



Now we need to start it, so click on start and wait for few minutes.

After that it will shows both the services status is started.



Once you came to know that App management and Subscription Settings services are running, you have to configure respective service applications.

Go to central admin -> click on Manage Service Application



Now check the two service applications are created or not.




App Management service application created by default so now we need to configure Microsoft SharePoint foundation subscription application.

we can not create application for SharePoint foundation subscription by using UI so we have to create this service using powershell only.



Now check new service application has been created.

Configure the Subscription Settings service application by using Windows PowerShell

Here the Powershell commands

$account = Get-SPManagedAccount "UKREDDY\administrator

$appPoolSubSvc = New-SPServiceApplicationPool -Name SettingsServiceAppPool -Account $account

$appSubSvc = New-SPSubscriptionSettingsServiceApplication –ApplicationPool $appPoolSubSvc –Name "Subscription Settings Service" –DatabaseName SubscriptionSettings_Service_DB

$serviceAppProxy = New-SPSubscriptionSettingsServiceApplicationProxy -ServiceApplication $appSubSvc



Now you can find the Subscription Settings service application in list of SharePoint application.


Configuring SharePoint to use App domain:

To configure the Apps for SharePoint. Go to Central admin and click on Apps.




Click on Configure Apps URL --> Enter app domain and what would be the prefix of apps in SharePoint --> OK.




we need to create an App catalog site collection to hold our Apps. When you add an App by uploading an App package, this is where you will do that.

To configure the App Catalog for SharePoint. Go to an Apps section in Central admin.

Click on Manage App Catalog --> select create a new app catalog site choice selected and hit OK.



 


Select web application --> Enter the Title, website address and primary site collection administrator details. It is similar like creation of site collection. Once it got created it will be redirected to "Manage App Catalog" section.




In "Manage App Catalog" section you can see newly created site and if you can click on that site it will open App catalog site.



That's it you have successfully configured the Apps for SharePoint 2013 environment.

In the next post, will see how to create SharePoint 2013 apps.

Error: Settings or services required to complete this request are not currently available. Try this operation again later. If the problem persists, contact your administrator.

When I was creating a SharePoint app , everything went fine . But when I configure Application url, I get below error

"Settings or services required to complete this request are not currently available. Try this operation again later. If the problem persists, contact your administrator."



Then I have checked the SharePoint log file and came to know that the memory usage has reached more than 98%.

I just open the task manager and its showing memory usage has reached 98%.


To resolve, open command prompt and run IISRESET or kiss the processors which are taking more memory.


ISSUE: when try to access SharePoint 2013 App repeatedly asking login credentials

For the first after created and deployed SP2013 App, Then when i was trying to access the app the system repeatedly asking for login credentials and tried multiple times then left it.

First I thought, I didn't configure app environment properly and have rechecked but everything is perfect. Then I came to know that there is an issue in Loopbackcheck through a blog.
To resolve the above issue follow as,

1. Click on Start -> Run and type regedit.
2. Locate the key 3. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
4. Right click on this key and choose New > DWord Value
5. Name this one "DisableLoopbackCheck"
6. Double-click then on it and type the value "1"
7. Reboot your server. (Mostly not required)

This helped me in resolving the issue.

Monday, October 20, 2014

Error: unknown sharepoint version 16.0 parameter name version while deploying sharepoint app

When i was trying to create my first SharePoint 2013 app model and try to deploy app to SharePoint using VS2013, i got the below error.
"unknown sharepoint version 16.0 parameter name: version".


After doing research, i came to know that SharePoint app project's TargetOfficeVersion set to 16.0 which I wasn’t able to find through the Visual Studio UI in project settings or properties.

I just close the VS2013 and opened my solution's CSPROJ file and i found that targetofficeversion is set to 16.0 and have changed it to 15.0.

Now  reopened the solution, clean it and deploy.

Issue: Developer site template missing in SharePoint 2013

Before creating any SharePoint 2013 app we need one site which has been created with developer site template.

"You can only deploy apps for SharePoint from Visual Studio 2012 to a Developer Site."

when i was first time trying to create site, i didn't find developer site template in template list.

Then i came to know that we need to activate developer feature and also i came to know that this feature is hidden you will not see it in the list of the site collection feature, so you will need to enable it using PowerShell:

Enable-SPFeature e374875e-06b6-11e0-b0fa-57f5dfd72085 -url http://sp2013dev:8383


Sunday, October 19, 2014

Issue: The Subscription Settings service and corresponding application and proxy needs to be running in order to make changes to these settings.

When i was configuring SharePoint 2013 Apps, we need to start the below two services before configuring app URLs,

1. App Management Service
2. Microsoft SharePoint Foundation Subscription Settings Service

after that when i tried to Configure App URLs then i got the below message.


Then i have checked service application. i have found that App Management Service application is created and running but Subscription Setting service application is not created.


And we cannot create service application using UI from central amdin, so we have to create using PowerShell. Here the snippet.

add-pssnapin "Microsoft.Sharepoint.Powershell"

$account = Get-SPManagedAccount <UKREDDY\administrator>

Remove-SPServiceApplicationPool -Identity SettingsServiceAppPool

$appPoolSubSvc = New-SPServiceApplicationPool -Name SettingsServiceAppPool -Account $account

$appSubSvc = New-SPSubscriptionSettingsServiceApplication -ApplicationPool $appPoolSubSvc -Name SettingsServiceApp -DatabaseName SettingsServiceDB

$proxySubSvc = New-SPSubscriptionSettingsServiceApplicationProxy -ServiceApplication $appSubSvc

Now we can see newly created service application and also we can configure app URLs.