Set Up an Existing Application to Publish to an Azure web app

You can set up an existing application with a publishing profile. You do not have to link your project to Azure at the time of creation (as shown in Figure 12.7). For example, suppose you have an existing application, as shown in the Solution Explorer inside Figure 12.17. Notice there is no publishing profile associated with the solution (as compared to Figure 12.10).

Image

FIGURE 12.17 An existing Visual Studio web application without a publishing profile.

To get started, you simply right-click the application in Solution Explorer and choose Publish. This brings up the Publish Web Wizard, as shown in Figure 12.11. However, in this case, there is no default publishing profile. Instead, you are required to select one of the publish targets listed in the dialog (or use the Import option).

Suppose for this example that you want to publish to a VM. You would then select Microsoft Azure Virtual Machines under the More Options section in Figure 12.11. This brings up the dialog shown in Figure 12.18. Here you can create a new VM or select an existing one tied to your Azure account and related subscriptions. Note that you can also use Server Explorer to create new VMs. This process will walk you through a more in-depth wizard.

Image

FIGURE 12.18 Select the Azure VM for the publishing profile.

You then continue walking through the Publish Web Wizard to build your publishing profile. For example, Figure 12.19 shows setting the connection information for an Azure VM deployment.

Image

FIGURE 12.19 You can use Publish Web to add a publishing profile to your solution (and to publish to VMs, too).

Your website is deployed upon completion of the wizard. Your Solution is also now updated with a publishing profile, as shown in Figure 12.20. Note that you can use the toolbar in the Web Publish Activity window to both republish your app (globe icon with arrow) and change settings (cog icon) for your publish profile using the Publish Web Wizard.

Image

FIGURE 12.20 A publish profile added to an existing solution.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset