Create a. NET application in the Azure Web application, azure.net

Source: Internet
Author: User

Create a. NET application in the Azure Web application, azure.net

This Quick Start helps you deploy your first ASP. NET Web application to the Azure Application Service within several minutes. After completing this tutorial, you will be able to start and run a simple Web application in the cloud. All the operations completed in this tutorial meet the $1 trial conditions.

Before getting started

This tutorial demonstrates how to use Visual Studio 2017 to build an ASP. NET Web application and deploy it to Azure. If Visual Studio 2017 has not been installed, you can download and use the free Visual Studio 2017 Community Edition. When installing Visual Studio, make sure that "Azure development" is enabled ". If you do not have Azure subscription, you can create a trial account before you start.

 

Step 1: Configure VS 2017 to connect to Azure in China

1. Create a JSON file AadProvider. Configuration. json with the following content:

{
"AuthenticationQueryParameters": null,
"AsmEndPoint": "https://management.core.chinacloudapi.cn",
"Authority": "https://login.chinacloudapi.cn/",
"AzureResourceManagementEndpoint": "https://management.chinacloudapi.cn/",
"AzureResourceManagementAudienceEndpoints": [ "https://management.core.chinacloudapi.cn/" ],
"ClientIdentifier": "872cd9fa-d31f-45e0-9eab-6e460a02d1f1",
"EnvironmentName": "Mooncake",
"GraphEndpoint": "https://graph.chinacloudapi.cn",
"MsaHomeTenantId": "f577cd82-810c-43f9-a1f6-0cc532871050",
"NativeClientRedirect": "urn:ietf:wg:oauth:2.0:oob",
"PortalEndpoint": "http://manage.windowsazure.cn",
"ResourceEndpoint": "https://management.core.chinacloudapi.cn/",
"ValidateAuthority": true,
"VisualStudioOnlineEndpoint": "https://app.vssps.visualstudio.com/",
"VisualStudioOnlineAudience": "499b84ac-1321-427f-aa17-267ca6975798"
}

2. Connect to the Azure Service in China

A.Make sure that Visual Studio is logged out and disabled.

B.Delete the % temp % \ servicehub folder (detailed path: C: \ Users \ % USERPROFILE % \ AppData \ Local \ Temp \ servicehub ).

C.Set the newly created JSON file (AadProvider. configuration. json) copy to % localappdata % \. identityService \ AadConfigurations (detailed path: C: \ Users \ % USERPROFILE % \ AppData \ Local \. identityService \ AadConfigurations. The AadConfigurations folder may not exist and needs to be created manually ).

D.Restart VS and add a Chinese Azure account.

3. Add a China Azure account in Cloud Explorer

4. Click Apply to view subscribed resources in Cloud Explorer.

Step 2: Create an ASP. NET Web application

1. in Visual Studio, use Ctrl + Shift + N to create a new project.

2. In the "new project" dialog box, click "Visual C #"> "Web"> "ASP. NET Web application (. NET Framework )".

3. Name the application myFirstAzureWebApp and click OK ".

4. Any type of ASP. NET Web application can be deployed to Azure. In this tutorial, select the "MVC" template and make sure that the authentication is set to "no authentication ". Click OK ".

Step 3: release to Azure

1. In Solution Explorer, right-click the "myFirstAzureWebApp" project and select "publish ".

2. Make sure you have selected "Azure Application Service" and then click "publish ".

3. the "Create Application Service" dialog box is displayed to help you create all the Azure resources required to run ASP. NET Web applications in Azure. Enter the name of the Web application you want, select subscription, create a resource group, and select an application plan. For details about the parameters, see here. Click create.

4. After the creation is complete, the ASP. NET Web application is automatically published to Azure (first release), and then the released Azure Web application is started in the default browser.

  

 

For more steps, click

Welcome

Graduate school A Azurecommunity@qq.com

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.