Take your web app to Azure

Visual Studio Blog

You’ve built your web app. It’s running, and getting good traffic. Now you need to move on to solving the ‘good problems’ to have. You want to scale your app to support more users, but only at peak times. Or you need better hardware and simply don’t want to manage that hardware… or software, or even the network. What if you just want to improve your app’s reliability? Any of these may be reasons to look at hosting your app in Azure. Azure gives you a variety of hosting options so you can balance cost, performance, and ease of management; and Visual Studio makes it simple to deploy and manage your apps in Azure.

Visual Studio 2017 gives you options to publish your app directly from your desktop, or to use Visual Studio Team Services to setup a CI/CD pipeline. Need to add monitoring and diagnostics to your app? Right click to connect to the Application Insights service. Want to secure your app with Azure Active Directory? Right click and add. Need to add a SQL Database to your Azure app? You can easily make it part of your publishing process.

Publishing to Azure

Publishing to Azure

Publishing your Visual Studio 2017 app to Azure is as simple as right-clicking your app’s project node and choosing to publish. From there you can choose to create new resources in Azure or select from existing resources to update your existing application. To make this work, you only need an Azure subscription, which you can set up for free with Visual Studio Dev Essentials (which will also get you access to training materials and other tools) or the free Azure trial.

Now that you are set to publish we can publish to existing resources, or we can create new resources. Choosing new resources is simple and straightforward, just find them in your subscription and you are all set. Follow the publishing steps, and in a few minutes your app will be deployed.

But what if you need to create new resources, how do you decide what resources to create? It all depends on you and your app, there is no right or wrong answer. Since the publishing steps are pretty much the same, let’s look at some of the capabilities of each hosting option:

Virtual Machines Service Fabric Docker and Containers
Virtual Machines App Service Service Fabric Docker & Containers
  • Infrastructure as a Service (IaaS)
  • Supporting Linux and Windows VM’s
  • Quickly move existing applications to the cloud, because you have full control over the configuration of the Virtual Machine
  • See how to deploy your app to a Virtual Machine at: aka.ms/deployvm
  • Platform as a Service (PaaS)
  • Supporting Linux and Windows OS’s
  • Unified development and management experiences eliminate the confusion of disparate services and providers, resulting in less navigation and lower overhead
  • See how to deploy your app to App Services at: aka.ms/deployappservice
  • Build and operate always-on, scalable, distributed applications
  • Package dependencies with your apps in Docker containers for portability and predictability during development, testing, and production deployments
  • See how to deploy your containers to Azure at: aka.ms/deploycontainer

Setting up a CI/CD pipeline to Azure

 

Publishing from your desktop works, but isn’t the best solution for every circumstance. For example, if you want to get your app published with every commit / check-in, or if you want to make sure every publish includes all the code from multiple developers, there is a simpler way to publish. In Visual Studio 2017 you can simply right-click on the solution and select Configure Continuous Delivery to setup that CI/CD pipeline in Visual Studio Team Services, and get your app flowing to Azure on a consistent basis.

 

 

Extending your app with Connected Services

Connected Services

Publishing an app is only part of the benefit of leveraging Azure. As a developer, you are concerned with things like application performance and storage. You also may want to do things like expand your app with Office 365 APIs. In Visual Studio 2017, Connected Services let you easily adopt key services in Azure by right-clicking and adding those services. These become a natural extension of your application, and configuration is completed as they are added – no need to bounce between the portal and IDE to get them setup. Keep an eye on the list of services as we are going to continue to add services and make it faster and easier to extend your app with Azure.

 

That’s all it takes

Publishing your app to Azure, or extending your app with Azure services is simple to do through Visual Studio 2017 or Visual Studio Team Services. Take a look at a cropped version of our infographic. You can also download the complete infographic.

Visual Studio 2017 Toosl for Azure Poster

Now that your app is running in Azure, you might need to do some troubleshooting. Check out the post from Dan Taylor on the Snapshot Debugger to see one of the powerful diagnostics experiences you can get when hosting your .NET app in Azure. Stay tuned for more great diagnostics experiences.

Let us know what you think. You can report problems via the Report a Problem option in the upper right corner, either from the installer or the Visual Studio IDE itself, and then track your feedback on the developer community portal. For suggestions, let us know through UserVoice.

Brian Moore, Senior Program Manager, Azure Tools

Brian is a Senior Program Manager working on the Azure Tools Team in the Cloud & Enterprise Division.

0 comments

Discussion is closed.

Feedback usabilla icon