Provider Hosted App Deployment to Azure Website’s (One Azure site for multiple apps)

Deployment Steps

  • Create an Azure Website in Azure Portal. In this example, I am going to create an azure website with name “cloud-demo-providerapps”
  • I wish to use one azure website to host multiple provider hosted apps. So I am going to create separate folders to deploy my provider hosted app files as shown below: (In this example, I am going to deploy my provider hosted app files under “AzureDeployTest” folder.)

Note: It is mandatory to check the application checkbox

  • To prepare the build, create a new folder in your system(laptop/server). In this example the folder name is “SPOL_Stage_Build_09252015V01
  • Download the azure website profile from azure portal and paste it inside the “SPOL_Stage_Build_09252015V01” folder. In this example my azure profile name is “cloud-demo-providerapps.azurewebsites.net.PublishSettings

         Note: This will be done by admin team. So include this in the deployment instruction.

  • Create a XML file inside the “SPOL_Stage_Build_09252015V01” folder with name “xml” and configure the XML file in the below format

<?xml version=”1.0″ encoding=”utf-8″?>
<parameters>
<setParameter name=”IIS Web Application Name” value=”cloud-demo-providerapps/AzureDeployTest” />
</parameters>

Here cloud-demo-providerapps is the azure website name and AzureDeployTest is the folder where I wanted             to place my provider app files.

  • Download the below PowerShell script from my one drive and paste it inside the “SPOL_Stage_Build_09252015V01” folder

        Publish-AzureWebApp.ps1

  • Package the provider hosted web project and paste the zip file inside the “SPOL_Stage_Build_09252015V01” folder. In this example my package file name is “AzureDeployTestWeb.zip

Note: This will be done by development team.

  • At this point my build should be ready as shown below
  • Open the Windows PowerShell IDE and navigate to the “SPOL_Stage_Build_09252015V01” folder location
  • Execute the following command

.\Publish-AzureWebApp.ps1 -WebDeployFile AzureDeployTestWeb.zip –SetParametersFile config.xml -PublishSettingsFile cloud-demo-providerapps.azurewebsites.net.PublishSettings

  • If everything works fine, deployment artifacts should be deployed to the target folder and you should see the success message in the powershell IDE.
Advertisements

About Joseph Velliah
As a SharePoint Developer my professional interests tend to be technical and SharePoint focused. I run a blog at "SP RIDER" where you can expect to read HOW TOs and scenarios that I run into during my day to day job. I hope my posts will give back a little to the community that is helped me.

Comments are closed.

%d bloggers like this: