- Visual Studio 2015 update 2
- Active Microsoft Azure Account
Microsoft Azure is one of the most popular cloud services. It is very easy to deploy the web apps, mobile services, and virtual machines in Microsoft Azure. It is also very easy to create and setup the app. You can deploy the services on Azure cloud so that they can be accessed from anywhere, anytime.
Follow these steps to create and deploy the ASP.NET Web app in Azure, with the help of Visual Studio 2015.
Step 1: Go to Visual Studio 2015 update 2. Select New--> Installed --> Visual C# --> Web--> ASP.NET Web Application (as shown in the image below) and give a name to your project. Select the appropriate location to save your project. Give the solution and project the same name. It helps in executing the project with ease.
Step 2: Next, select the Empty web form and click OK to continue. It takes some time for adding the libraries.
Step 3: Next, add web form.
Step 4: Next, select the Web form, give it a name, and click Add. In this area, many type of forms are available. In this web form, we write CSS and HTML code and run the program.
Step 5: Next step is the programming part.
Write HTML code or design it using GUI method (hello world). Here, Visual Studio has three parts - design (For designing the application without going in HTML),split (Offers both the options, HTML and GUI), and code (For designing the application through HTML hard code). You can choose any option to design the application interface.
Noe, click on run (any browser), at the top ribbon.
Output: This will show your content on the browser.
Go to portal.azure.com(sign in). You must have an active Azure account, either paid or free, in order to submit the application on cloud.
Step 7: In the Azure portal, go to your dashboard. Now, go to New-->Web+Mobile-->Web App.
Step 8: Now, comes the creation part.
- Give your web app a unique domain name ( Ex:sample ).azurewebsites.
- Next, assign the group name.( Ex:web).
Now, check or un-check the option of "Pin to dashboard" as per your preference and click Create.
Step 9: Now, examine the notification. If the deployment is successful, go to the next step otherwise create the new web app again.
Next, click the domain name of your application (http://sample.azurewebsites.com).
Output: It will show that your app is now accessible from anywhere, anytime.
Next, go to More...
option in your web app and select Get publish profile. Thisis the package to load or publish your web app n the Azure cloud.
- Go to V isual Studio 2015 .
- Open the S olution Explorer and select your project name (Ex:select).
- Right click to select the
Step 12: It will open the publish profile.
- Next, select the publish target here. You can select the Import your publish profile .
- Click N
Step 13: In this step, browse your file (publish profile) and click OK.
It will show the profile of your web app.
Next, you need to check the validation of your web app that you want to deploy. If an error occurs, download the profile again.
Finally, select Publish and you can see your project on the web browser with its URL ( Ex: www.sample.azurewebsites.com).