HOW TO: Deploy a provider hosted app as an Azure site
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.
2. Select ACS.
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.
4. Publish the App project by specifying the same Redirect URL, Client ID and Client Secret as in the previous step.
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.
6. Upload the app to the App Catalog site collection in your SharePoint site.
7. Modify the AppWeb web.config file to include the Client ID and Client Secret as shown below.
8. Deploy the web site to the desired location using any of the publishing methods available.
9. Add the app to one of the sites and launch it.
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
- Anonymous
January 27, 2014
Nice article, it helped me! - Anonymous
April 03, 2014
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/ - Anonymous
June 22, 2014
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? - Anonymous
October 28, 2014
Very helpful ... well written and clear enough that even a newbie like me could follow. Thanks - Anonymous
January 24, 2015
hendjus,wo, - Anonymous
October 14, 2015
I get the following error: An error occurred while processing your request. - Anonymous
October 15, 2015
GET YOUR PROBLEM SOLVE TODAY WITH MY PROFESSION IN ANY SPIRITUAL SPELL OR ANY KIND OF PHYSICAL BATTLE THAT NEED, MY NAME IS DR SYLVESTER AND THIS IS MY EMAIL FOR CONTACT (stbenson391@gmail.com) OR YOU CAN FOLLOW HIM UP ON FACEBOOK BY MY NAME (SYLVESTER E BENSON) ON FACEBOOK OR CALL ME ON MY MOBILE NUMBER +2348136090988, AM ALWAYS AVAILABLE TO RENDER YOU HELP WITH EXPERIENCE OF 32 YEARS IN SPELL CASTING AND HERBAL MEDICURE TO CURE ANY KIND OF DISEASE THAT YOU MAY HAVE, CONTACT ME ON ANY KIND OF ISSUES. - Anonymous
February 11, 2016
lorem ipsum