Windows Azure provides us with a powerful PAAs platform that allows us to publish developed applications on demand without having to deploy and maintain the infrastructure, and supports multiple languages and platforms such as: ASP. NET, PHP, Python, Ruby, Java, etc.
This article will use Visual Studio 2013 to create a new Web application with basic database add, delete, and change operations to demonstrate how to create and publish an ASP. NET Web application to Windows Azure.
This sample project source code can be downloaded from the attachment
Process:
1. Using Visual Studio 2013 to create an ASP. NET WEB Application project with data operations
2. Create a Windows Azure Web Site
3. Create a database and link resources
4. Publishing the Web application
Steps:
1. Create a new ASP. NET MVC Web application using Visual Studio
2. New customer class, as Entity Framework model entities class, including CustomerID, Name, Phone, Address, company, Title, email and other attributes.
3. Create an MVC controller, model, view
To facilitate the demonstration, we use the scaffolding item to simplify the code writing, it will help us to automatically generate controllers, models, views to complete the data increase, delete, change, check operation
Select the MVC 5 controller that contains the view (using the Entity Framework), see
Model class: Customer
Data Context class: Customercontext
Using asynchronous controller operations: True
Controller name: Customerscontroller
Auto-generated Customerscontroller Controller code ():
4. Next, we need to create a new Web site in Windows Azure.
Open Windows Azure Management portal (https://manage.windowsazure.com), select New Web site, enter the URL of the site, and select a region.
5. Create the SQL database required for the site
Specify the data name, service tier, performance level, server.
6. Create a "linked resource"
Go back to Web site, select link resources, add the SQL database you just created
7. Download the publishing profile for the site
Back in the dashboard of your website, select download Publish profile to download the file to your local computer.
8. Specify the project release profile
Go back to the Visual Studio project, publish the project, publish the target select Import, and load the publish profile that you downloaded in the previous step.
Specify the server, name, user name, password, and click "Verify Connection" according to the contents of the configuration file, and proceed to the next step after successful.
Publish and database configuration, the default selection continues here, the database is the SQL database created in section 6th and published after clicking "Finish".
9. Browse Post-publishing sites
When Visual Studio is published successfully, you can open the published Site page by entering the Web site address Http://myazurewebsiteproject.azurewebsites.net/Customer in the browser.
To add, modify, delete, and so on.
Example Project Download: Azurewebsiteproject
Use Windows Azure to create and publish your ASP.