Click here to Skip to main content
15,896,606 members
Articles / Productivity Apps and Services / Sharepoint / SharePoint 2013
Tip/Trick

Apps in SharePoint 2013

Rate me:
Please Sign up or sign in to vote.
3.67/5 (3 votes)
17 Nov 2015CPOL2 min read 10.6K   2  
Creating a SharePoint 2013 Provider-hosted App

Introduction

Basically in SharePoint, the application can be hosted by three types:

  1. Provider-hosted
  2. Hosted in the cloud (Windows Azure auto hosted)
  3. Hosted in a SharePoint environment

Creating a SharePoint 2013 Provider-hosted App

I want to create a Provider-Hosted App in 2013 using Visual Studio Ultimate 2012.

I have installed Windows server 2012, enabled all required features. Installed Office 2010, SharePoint 2013, Visual Studio Ultimate 2012 and Developer tools for SharePoint 2013.

Now let’s create a Provider-hosted app for a SharePoint 2013 Team site created on Office 365.

Step 1

Open Visual Studio 2012 and select Apps->App for SharePoint 2013.

Image 1

Step 2

Enter the URL of the Site collection where you wish to deploy the app and select Provider Hosted option. Click Next button.

Image 2

Step 3

On the second page, the Visual Studio wizard for creating a provider-hosted app asks you to choose between a client secret and a certificate.

Image 3

Select use a client secret and click Finish.

Image 4

Step 4

You will notice that there are two projects, i.e., one for app and the other for web created under the solution.

Image 5

Go to the Default.aspx and we will enter some HTML tags and text to display.

Image 6

Step 5

Right click on the TestProviderHostedApp and select publish.

Image 7

Step 6

The following window will pop up.

Image 8

From the Drop Down, select New option and provide a name for the Profile. Click OK and then Next button.

Image 9

Step 7

In the next page, you will be asked to provide the url where the site is hosted, a Client ID and a Client Secret.

Image 10

For creating the Client ID, go to the AppRegNew.aspx page. The URL would be something like this:

https://<SharePointWebsite>/_layouts/15/ AppRegNew.aspx

Image 11

Now click on Generate Button of App Id and App Id will be created. Copy the Id and Paste in Client ID as shown below:

Image 12

Click Next Button.

Image 13

Now click Finish button.

Image 14

Step 8

Once the app is published, the folder containing the .app file will open.

Image 15

Step 9

Now open the SharePoint site where you wish to deploy the app and click on the "new app to deploy" link.

Image 16

The below popup will appear. Click on the upload link.

Image 17

Upload the .app file location for uploading the app to the site.

Image 18

Enter the .app file location for uploading the app to the site.

Image 19

Once the file is successfully uploaded, then click ok.

Image 20

Once the app is successfully installed, click on Deploy button to deploy the app.

Image 21

References

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer
India India
This member doesn't quite have enough reputation to be able to display their biography and homepage.

Comments and Discussions

 
-- There are no messages in this forum --