. Windows Azure Web site experience on net and Visual Studio
Source: Internet
Author: User
KeywordsAzure.netazure
In this blog, you will learn how to ">asp" existing http://www.aliyun.com/zixun/aggregation/14235.html. NET application to Windows Azure Web site. The demo application is a asp.net MVC 4 application that accesses data stored in SQL Server using entity Framework (EF) Code one. It also uses the EF Code-migrations to manage the application architecture.
Web applications created with Visual Studio can be easily published to Windows Azure Web site. After you create your Web site in the preview portal, you should download the release profile. This can be achieved by clicking the download Publish profile link in the Quick Browse section of the Web site dashboard. As shown in the following figure.
You need to import this publishing profile into visual Studio so that your application can be published. To do this, right-click on the Web project and select Publish.
This opens the New Publication dialog box. If this is the first time that you publish this item, the dialog box opens the Profiles tab, as shown below.
Now, click Import and locate the release profile that you previously downloaded from the portal site. Once you import this file, you will be automatically taken to the Connection tab, and you will see some of the release configuration values filled out.
On this page you can click the Verify Connection button to make sure your computer is able to communicate with Windows Azure and you are ready to proceed to the next step.
When you click Next, on the Settings tab, you will see any database used by your application. This application contains automatic detection to EF context,sqlimagecontext. For each database you can expand the Drop-down list and select the connection string to use when publishing the application. You will see:
There are two ways to use the code first: You can configure your migration to be performed when the context is accessed for the initial time, or in code or Web.config. When you select the "Apply Code First Migration" checkbox, your Web.config file will be modified during the release process to ensure that the code first migration is performed during the initial access to the context. Note: This will not modify the original web.config in your project and only modify the web.config placed on the server. Now we can go to the final step and preview.
On the Preview tab, you will quickly preview all of the file actions that you perform when you publish your application. You will also see a database of all published configurations. In the image below you can see the Preview tab.
Since this is the first time you publish an application, the entire content will be published to the server. Subsequent publication changes will be published only. Now you are ready to publish your application. You should now click the Publish button.
After you click Publish, you can monitor the progress of the publishing process in the Output window. When the publishing process completes successfully, the browser automatically opens to your site location. This is all you need to know to quickly publish your Web project to Windows Azure Web site.
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.