SharePoint 2013: Common Development Issues and Solutions

The most prominent feature of SharePoint 2013 when compared to its predecessor SharePoint 2010 is the app model of development. In app model, there is the flexibility of creating and designing pages where one can define the functionality in the .NET language which will behave similar to any other .NET application during development. There will be an app project as well as a web application project. The web application contains the aspx pages , scripts, styles etc for the app to function which is similar to any other web application where as app project will contain the configurations for app. And yes, you can use client side code instead of C#. But as a .NET programmer I prefer the .NET coding for that.

You will be defining the far and wide of your page based on your requirements. If you are familiar with the web application model of .NET, you won half the battle. You could define the hierarchy of folders and pages in your application without any constraints imposed by SharePoint. Once the functionality is finished and tested, the app can be added to the app catalog and the web application can be published to a hosting environment.
It behaves similar to any other app where one can install it when he needs it and uninstall it completely when he does not need it any longer.

Here I would like to deal with some of the issues which I have faced during the development of my very first app model project in SharePoint 2013 and the solutions to those problems. I hope they would be helpful for the beginners in trouble.

Most of the issues are due to the lack of necessary privileges in the SharePoint Databases for the user account which is being used to create and run the application.

Issue 1:

Error occurred in deployment step ‘Install app for SharePoint’: The System Account cannot perform this action.

Solution:
You cannot use the System Account to create and run the application. For that another account is required. Create a new account under the domain and give admin privileges.


Issue 2:
SharePoint Addin The local SharePoint server is not available. Check that the server is running and connected to the SharePoint farm

Solution:
Give owner permission to the SharePoint database for the user account from SQL as follows:
From the SQL Server Management Studio
Security -> Login sub menu -> User Account-> Properties-> User Mapping-> select your SharePoint database and give owner permission to the account
Refer the steps described below if you are not aware of how to give permission.

Step 1:

1


Step 2:

2_orig_1

 


Step 3:

3

Issue 3:
Cannot connect to the SharePoint site:
Make sure that this is a valid URL and the SharePoint site is running on the local computer.
If you moved this project to a new computer or if the URL of the SharePoint site has changed since you created the project, update the Site URL property of the project

Solution:
Give owner permission to the SharePoint database WWS_COntent and AppMng_Service_DB


Issue 4:
‘Install SharePoint Add-in’: We’re sorry, we weren’t able to complete the operation, please try again in a few minutes. If you see this message repeatedly, contact your administrator.

Solution:
Give owner permission to databases start with ‘AppMng_Service_DB_’ and ‘App_Management_’ for the user account.

After deployment you may get the following errors:

Issue 5:
Web page not available:
Solution:
Check the certificate path and the name is correct. Confirm that the extension “.pfx” is there for the certificate in the web.config of the deployed site.


Issue 6:
HTTP 401.2 -Unauthorized: Logon Failed Due to Server Configuration with No Authentication

Solution:
To resolve this problem, enable at least one authentication method. To do this, follow these steps:
From the Start menu, point to Programs, point to Administrative Tools, and then click Internet Services Manager.
Under the Tree pane, browse to the desired Web site.
Right-click the Web site, and then click Properties.
On the Directory Security tab, under Anonymous access and authentication control, click Edit.
Select (and implement) at least one type of authentication method.


Issue 7:
Authentication failed/ 403 error

Solution:
Update the changed client Id in the web.config file of the web application as in VS and app.

Thanks for reading! Happy coding!

Advertisements

3 Comments Add yours

  1. theonlysup says:

    SharePoint 2013 is good. I had used long back. U have good solutions for some common problems ..

    Liked by 1 person

    1. Anju Raj says:

      It’s been a long since I worked on SharePoint actually.. These are the workarounds which saved me at that time.. Hope it would be helpful to someone..

      Liked by 1 person

      1. theonlysup says:

        Sure. My domain is .net so found it relevant .. It will help many SharePoint developers for sure

        Liked by 1 person

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s