SharePoint Developer Support Team Blog

The Official blog of the SharePoint Developer Support Team

HOW TO: Deploy a provider hosted app as an Azure site

HOW TO: Deploy a provider hosted app as an Azure site

  • Comments 4
  • Likes

This post is a contribution from Charls Tom Jacob, an engineer with the SharePoint Developer Support team.

In this blog, I will describe the steps to deploy a provider hosted app on Windows Azure hosted site (same steps should work for any IIS sites for that matter).  The app will be deployed into SharePoint Online site, whereas the underlying business logic will reside on a separate server.  It could be an on-premise server or a server provided by a hosting company.  For this blog post, I decided to use a site hosted on Azure.

1. Create a provider hosted app project in Visual Studio 2012.

clip_image002

2. Select ACS.

clip_image004

3. Navigate to your App Catalog site collection URL (/_layouts/15/appregnew.aspx).

a. Generate a Client ID and Client Secret.

b. Make sure to give correct values for AppDomain and Redirect URL. This should be corresponding to where you want to host your app web.

clip_image006

4. Publish the App project by specifying the same Redirect URL, Client ID and Client Secret as in the previous step.

clip_image008

5. This gives you the deployable units as below.

a. Rename the .app file to .zip and verify that app manifest contains the correct Client ID.

clip_image009

6. Upload the app to the App Catalog site collection in your SharePoint site.

clip_image010

7. Modify the AppWeb web.config file to include the Client ID and Client Secret as shown below.

clip_image011

8. Deploy the web site to the desired location using any of the publishing methods available.

clip_image012

9. Add the app to one of the sites and launch it.

clip_image013

NOTE: You will run into “The parameter ‘token’ cannot be null or empty string” error if you make a mistake in the Client ID and/or Client Secret or redirect URL.

Hope this walk-through was helpful!

Comments
  • Nice article, it helped me!

  • Hi, Thanks for this article. I found one more good link for Provider Hosted Apps here :
    http://hackingkart.com/how-to-create-provider-hosted-app-vol1/

  • Hi,

    Very nice article, good written steps.
    I just want to know that how to deploy multiple (two or more) Provider Hosted apps on a single Azure web site? Is is possible or we need to create separate website on azure for each provider hosted app?

  • Very helpful ... well written and clear enough that even a newbie like me could follow. Thanks

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment