{"id":24726,"date":"2018-05-02T23:01:28","date_gmt":"2018-05-02T23:01:28","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/webdev\/?p=13605"},"modified":"2018-05-02T23:01:28","modified_gmt":"2018-05-02T23:01:28","slug":"exploring-azure-app-service-introduction","status":"publish","type":"post","link":"https:\/\/sickgaming.net\/blog\/2018\/05\/02\/exploring-azure-app-service-introduction\/","title":{"rendered":"Exploring Azure App Service \u2013 Introduction"},"content":{"rendered":"<p>Have you ever needed to quickly stand up a web site, or web API app that was publicly available? Is your team or organization thinking about moving to the cloud but aren\u2019t sure the best place to start? One of the first places you should look is <a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/app-service\/app-service-web-overview\">Azure App Service Web Apps<\/a>. In this post we\u2019ll look at how easy it is to get started, and a quick overview of key concepts.<\/p>\n<p>App Service offers the following benefits:<\/p>\n<ul>\n<li>A fully managed platform, meaning Azure automatically updates the operating system and runtime as security and stability fixes are released.<\/li>\n<li>10 free plans to every subscriber, so it won\u2019t cost you money or credits to try your app in Azure.<\/li>\n<li>First class support in Visual Studio, meaning that you can go from your app running on your local machine to running in App Service in less than 2 minutes.<\/li>\n<li>If offers <a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/app-service\/web-sites-staged-publishing\">deployment slots<\/a>, which enable you to stage multiple versions of your app, and route varying amounts of traffic to the various versions (i.e. do A\/B testing, or a ringed release model).<\/li>\n<li>Scale up and down quickly and automatically based on load<\/li>\n<li>For a more see <a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/app-service\/app-service-web-overview#why-use-web-apps\">Why use Web Apps?<\/a><\/li>\n<\/ul>\n<p>In this blog post, I\u2019ll provide an overview of App Service\u2019s key features and concepts by walking through using Visual Studio to publish an ASP.NET application to Azure App Service.<\/p>\n<h2>Let\u2019s get going<\/h2>\n<p>To get started, you\u2019ll first need:<\/p>\n<ul>\n<li>Visual Studio 2017 with the <i>ASP.NET and web development<\/i> workload installed (<a href=\"https:\/\/www.visualstudio.com\/thank-you-downloading-visual-studio\/?sku=Community&amp;rel=15&amp;utm_source=azuremscom&amp;utm_medium=clickbutton&amp;utm_campaign=tailored_azuredlpage&amp;rid=34348\">download now<\/a>)<\/li>\n<li>An Azure account:\n<\/li>\n<li>Any ASP.NET or ASP.NET Core app, for the purposes of this post, I\u2019ll use a basic ASP.NET Core app<\/li>\n<\/ul>\n<p>To start I\u2019ll right click my project in Solution Explorer and choose \u201cPublish\u201d<\/p>\n<p><a href=\"https:\/\/msdnshared.blob.core.windows.net\/media\/2018\/05\/clip_image0011.png\"><img loading=\"lazy\" decoding=\"async\" title=\"clip_image001\" alt=\"clip_image001\" src=\"http:\/\/www.sickgaming.net\/blog\/wp-content\/uploads\/2018\/06\/exploring-azure-app-service-introduction.png\" width=\"611\" height=\"484\" border=\"0\" \/><\/a><\/p>\n<p>This brings up the Visual Studio publish target dialog, which will default to the Azure App Service pane. The \u201cCreate new\u201d radio button is already selected to, so I\u2019ll click the \u201cPublish\u201d button on the bottom right.<\/p>\n<p>This will open the Create App Service dialog in Visual Studio.<\/p>\n<h2>Key App Service Concepts<\/h2>\n<p>The dialog has four fields that represent key concepts of creating an App Service:<\/p>\n<ol>\n<li><b>App Name:<\/b> Will be the default public facing URL in Azure (it will be of the form https:\/\/&lt;App_Name&gt;.azurewebsites.net \u2013you can configure domain names later if needed).<\/li>\n<li><b>Subscription: <\/b>The Azure Subscription to create the resources in if you have more than one<\/li>\n<li><b>Resource Group:<\/b> Groups your application and any dependent resources (SQL Databases, Storage Accounts, etc., <a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/architecture\/cloud-adoption-guide\/adoption-intro\/resource-group\">see resource group design to learn more<\/a>). To edit the name, click \u201cNew\u2026\u201d.<\/li>\n<li><b>Hosting Plan:<\/b> The hosting plan is a set of reserved resources for your app. You can choose to host multiple apps in a single hosting plan (we\u2019ll explore this further in a minute).<\/li>\n<\/ol>\n<p><b><a href=\"https:\/\/msdnshared.blob.core.windows.net\/media\/2018\/05\/clip_image003.jpg\"><img loading=\"lazy\" decoding=\"async\" title=\"clip_image003\" alt=\"clip_image003\" src=\"http:\/\/www.sickgaming.net\/blog\/wp-content\/uploads\/2018\/06\/exploring-azure-app-service-introduction.jpg\" width=\"1025\" height=\"772\" border=\"0\" \/><\/a><\/b><\/p>\n<p>One concept that can be confusing is the relationship between the \u201cHosting Plan\u201d (or App Service plan\u201d) and the \u201cApp Service\u201d:<\/p>\n<ul>\n<li><b>The Hosting\/App Service plan<\/b> is the virtual machine resources you are reserving in Azure to host your application. This is what you are paying or using credits for.<\/li>\n<li><b>The App Service<\/b> is your app and associated settings that run inside of the plan. You can run multiple apps (App Services) in the same plan (virtual machine) with the same implications as sharing any other server or VM between apps.<\/li>\n<\/ul>\n<p>To explore the App Service plan further, click the \u201cNew\u2026\u201d button next to the Hosting Plan dropdown to open the \u201cConfigure Hosting Plan\u201d dialog that has three fields:<\/p>\n<ol>\n<li><b>App Service Plan:<\/b> A non-public facing name for the plan.<\/li>\n<li><b>Location:<\/b> Is the region your app will run in. You generally want to pick a region that is close to customers that will be accessing the site.<\/li>\n<li><b>Size: <\/b>The size of the virtual machine you want to reserve for your application and the capabilities you want (e.g. deployment slots require a Standard or Premium plan).<br \/><i>Note: Free and Shared plans run in the same VM as other App Service apps and are intended for development and testing, <\/i><a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/app-service\/azure-web-sites-web-hosting-plans-in-depth-overview\"><i>see App Service plan overview for more details<\/i><\/a><i \/><\/li>\n<\/ol>\n<h2>Publishing the app<\/h2>\n<p>At this point I\u2019m ready to publish my app to App Service. The bottom right panel of the Create App Service dialog will show me all the resources I\u2019m going to create in Azure (in this case a Hosting Plan and App Service). Everything looks good, so I just need to click \u201cCreate\u201d:<\/p>\n<p><a href=\"https:\/\/msdnshared.blob.core.windows.net\/media\/2018\/05\/clip_image005.jpg\"><img loading=\"lazy\" decoding=\"async\" title=\"clip_image005\" alt=\"clip_image005\" src=\"http:\/\/www.sickgaming.net\/blog\/wp-content\/uploads\/2018\/06\/exploring-azure-app-service-introduction-1.jpg\" width=\"1028\" height=\"771\" border=\"0\" \/><\/a><\/p>\n<p>Visual Studio will create all the resources on my behalf, publish my application, and open my default browser to the URL of the published application.<\/p>\n<h2>Conclusion<\/h2>\n<p>Hopefully, this overview of App Service concepts has been helpful and inspired you to give App Service a try. We believe that for many people, App Service is the easiest place to get started with cloud development, even if you need to move to other services in the future for further capabilities (<a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/app-service\/choose-web-site-cloud-service-vm\">compare hosting options<\/a> to see additional choices). As always, let us know if you run into any issues, or have any questions below or <a href=\"https:\/\/twitter.com\/AndrewBrianHall\">via Twitter<\/a>.\u00a0 If you\u2019re interested in exploring more, see the next post in our series <a href=\"https:\/\/blogs.msdn.microsoft.com\/webdev\/2018\/05\/18\/exploring-azure-app-service-web-apps-and-sql-azure\/\">introducing how to setup and use SQL Server with App Service<\/a><\/p>\n<p> &#013; <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Have you ever needed to quickly stand up a web site, or web API app that was publicly available? Is your team or organization thinking about moving to the cloud but aren\u2019t sure the best place to start? One of the first places you should look is Azure App Service Web Apps. In this post [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":24727,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[66],"tags":[54,81],"class_list":["post-24726","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-microsoft-webdev","tag-azure","tag-visual-studio"],"_links":{"self":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/posts\/24726","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/comments?post=24726"}],"version-history":[{"count":0,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/posts\/24726\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/media\/24727"}],"wp:attachment":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/media?parent=24726"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/categories?post=24726"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/tags?post=24726"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}