How to Host Multiple Cloud Business Apps on the Same Azure Web Site
This post is in response to a recent forum post titled "How to Publish Multiple SharePoint-enabled LightSwitch apps to a single Azure Website or Cloud Service?" The title of this is pretty post pretty much says it all. Publishing multiple CBA's to the same Azure Web Site can be achieved with minor configuration changes to the site and by including the right settings in the publish wizard. I have created a video demonstrating this. Below are the highlights for those of you that don't care to hear my melodious voice :-)
Login to the Azure Management Portal, either create a new or navigate to an existing Web Site. Go to the Configure tab scroll to the bottom and create "Applications" for all your CBAs.
Once you have entered the values, hit Save and you will be set with Applications. Navigate to "Dashboard" and click "Download the publish profile"
Now open your CBA in Visual Studio. The app is published as you would normally publish a provider-hosted CBA, with a few exceptions:
The application must use the IIS path of the publish wizard where you will import the publish settings file you exported in the previous step.
On the "Publish Settings" page add the application name.
On the "SharePoint Client ID" page, the URL needs to be completely changed to the full URL of the web application that was defined in the Azure Portal.
That is it for what is different. Deploying the SharePoint app package isn't any different than a "normal" CBA deployment.
So the key takeaways are:
- Create Application directories in the Azure Portal for each of your apps
- Use the IIS path of the publish wizard instead of the Azure path
- Update the appropriate URLs in the publish wizard to include the app name