Create ASP.NET Project
Open Visual Studio.
- File => New => Project.
- Select Visual C# => Web =>ASP.NET Core Web Application (.NET Core).
Now, you can select ASP.NET Core Version and Templates,
- Select => Web Application.
After creating your Web Application, you will see the screen given below.
Now, run the Application and you will see the screen given below.
Creating Azure app Service
Now, let's create Azure app
- Login to http://portal.azure.com/
- Click New => Web + Mobile => Web App
After clicking or selecting web app you get new screen which you need to provide information about the app,
- App Name => App Name is the name, which you can give to Web app. It must be unique.
- Subscription => Type of subscription; which you are using.
- Resource Group => You can create a new resource group or, using your exiting resource.
- App Service Plan => App Service plans represent a set of features and capacity, which you can share across your apps. App Service plans gives you the flexibility to allocate specific apps to a set of resources and further optimize your Azure resource utilization.
Now, it will take a while to deploy the Web app. After it is deployed, go to your resource group and click on the Website, which you have deployed. Afterwards, you will see the screen given below.
Now, click Get publish Profile, which will download the publish setting, which needs to be deployed to this Web site. Afterwards, you have downloaded the published file. Let's switch back to Visual Studio.
- Right click on your project.
- Click Publish.
- Select Import Profile.
Now, locate your published file
After selecting the published file, you can change the setting of deployment. For this demo, I am using Web deployment, as shown below.
Now, click Publish and it will publish your Web app shortly.
After publish, it is complited to your Web app. It will automatically launch your Browser with your Web app.
Summary
- Create Web app from Visual Studio.
- Created Azure Web app.
- Used Azure to publish file.
- Publish Web app from Visual Studio.