This is a continuation to my previous post Step by Step Guide to Create Provider Hosted App in Sharepoint 2013 Online with Azure Hosting Model- Part 3
Publish the app in SharePoint On line site :
Right click on your appproject (MSPProviderHostedDemo) in visual studio and say publish.
Click on Edit and provide the Client and Client Secret (Which we generated in above steps).
Then click on “Package the App” button. You will get a warning saying SP requires azure url as https.
So change the url to https like below.
A App file is generated and the folder will be opened in windows explorer with the version number
path C:\Users\madpu02\Documents\Visual Studio 2013\Demos\MSPProviderHostedDemo\MSPProviderHostedDemo\bin\Debug\app.publish\184.108.40.206
Copy the app file and upload in AppsforSharepoint library in your SharePoint appcatalog site.
In my case here is the url
Once upload is completed in appcatalog site, go to your sharepoint online site where you want to install and run this app.
In my case url is like this https://pcmsp.sharepoint.com/sites/SPODev
Go to site contents à Add an App à Then our app should appears in the “apps you can add”section like below.
Click on App and Say Trust It
With this your app installtion is completed. You can see it in site contents tab like below.
Now click on the app, it should redirect to default.aspx page in our azure website like this.
The url looks like this , it contains the host sharepoint site url as a parameter for the the azure website url..
We Successfully Created and Published the Provider Hosted app in to Azure...!! Hope this post helps you guys...!!