Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
Create ASP.NET Web App In Azure
WhatsApp
Deepak Solanki
1y
8.3k
0
1
100
Article
Prerequisites
Microsoft Azure Account
: If you do not have an Azure account, you can
open a free Azure account
.
It comes with a one-month free trial.
Visual Studio 2013/2015
: You need to have Visual Studio installed on your machine.
Install
the Azure SDK for Visual Studio 2015 or the Azure SDK for Visual Studio 2013.
Let’s Start
Create an ASP.NET MVC web application
Open Visual Studio from the file
menu, and then click New, Project.
Under templates, select
Visual C#
,
Web
, then
ASP.NET Web application
.
Provide an appropriate project name, in my case it is ‘
DSWebAppSample1
’,
Click OK. Select ‘
MVC
’ from ASP.NET templates in the next screenshot. Click the ‘
Change Authentication
’ button. Make sure the ‘
Host in the Cloud
’ checkbox is checked and the ‘Web app’ is selected.
Select ‘No Authentication’, OK, and then click OK.
If you are not already logged in to Azure, Visual Studio prompts you to do so.
Sign in
with the ID and password of the account that you use to manage your Azure subscription.
Once you're signed in, the
Configure Microsoft Azure Web App Settings
dialog box asks you what resources you want to create. Provide a unique Web app name (this would b the first part of URL). Select ‘Create a new web service plan;' give some meaningful name. Create a new resource group and give some meaningful names. Select a region based on your location. Click OK.
It will take a few seconds to create the project. It will ask to select a source control and if you have TFS or Git configured, you can select one otherwise cancel the popup.
Once the project is created, you can check the
Azure App Service Activity
window to see details.
Do some visible changes: Go to Project, Views, then click Home. Open
index.cshtml
and put some personalized content in the first div. Now we are all set.
Deploy web app to Azure
In
Solution Explorer
, select a project, then right-click and
Publish
. It will open publish web dialog box and click ‘
Next
’.
In configuration, ensure ‘Release’ is selected and click
Next
, then
Publish
. It will take some time to publish on Azure, you can see the process in the output window:
Once it’s published, it will open in the browser.
Your web app is in Azure now, anyone with the URL can access this site.
Server Explorer- Open & edit remote files
You can use Server Explorer to open and edit remote files for debugging or minor changes.
Changes done here will directly reflect on the web app without any deployment.
Open Server Explorer in Visual Studio, Azure, and then select App Service.
Select ‘Your App Service’ and then ‘Your Web application.
Expand the Web application; go to Files, Views, Home, then click
Index.CSS HTML
Make some visual changes in HTML and save the file.
Refresh the page in the browser and the latest changes should be available.
ASP.NET
ASP.NET Web App in Azure
Azure
Create ASP.NET Web App
Azure SKD
Up Next
Ebook Download
View all
100 Practice Questions for AZ-900
Read by 5.3k people
Download Now!
Learn
View all
Membership not found