Exploring the untold story of the cloud (I) : Web Services Deploying Web Sites

Prelude: Windows Azure, Microsoft’s cloud-based operating system, is now called “Microsoft Azure,” which, like the Azure Services Platform, is the name of Microsoft’s “software and Services” technology. The main goal of Windows Azure is to provide a platform for developers to build applications that run on cloud servers, data centers, the Web, and PCS. Cloud developers can use storage, computing power and web infrastructure services from Microsoft’s global data centers. The Azure service platform includes the following major components: Windows Azure; Microsoft SQL database service, Microsoft.NET service; A Live service for sharing, storing and synchronizing files; Microsoft SharePoint and Microsoft Dynamics CRM services for business.

Quotation: Since its release in October 2008, it has achieved good results. There are many ways to deploy web projects on Microsoft Azure, and I will not list them here. I’ll just say one way to deploy a Web site through a Web Service. Of course, you need to apply for an Azure account before everything is ready.

Body:

1. Solution

A. First you need to get the latest code from source Depot. Then open solution. Modify the corresponding web. config file that needs to be modified.

B. Change the connection string first:

1 <add name="BingTestAzureContext" connectionString="Data Source=test.database.windows.net; Database=Test_DB; User Id=******; Password=*******; MultipleActiveResultSets=true" providerName="System.Data.SqlClient"/>Copy the code

C. configure Auth

1 <! --web auth conifg of test--> 2 <add key="test_appid" value="00000000xxxxxxxxxxx"/> 3 <add key="test_secret" value="GRXE-xxxxxxxxxxxxxxxxxxxxxx"/> 4 <add key="test_returnurl" value="http://xxxxxxx.cloudapp.net/"/>Copy the code

Note that test_returnurl is a web site URL that has been successfully deployed, and can be updated or directed according to the domain name you bought


d.update customErrors

  

1 <customErrors mode="On" defaultRedirect="~/error/servererror"> 2 <error statusCode="403" redirect="~/error/accessdenied" /> 3 <error statusCode="404" redirect="~/error/notfound" /> 4 </customErrors> 5 6 <! --Comment out below line.--> 7 <customErrors mode="Off"></customErrors>Copy the code

About how to customize the error page mainly depends on the project needs, how to customize the garden of other greatly believe that the introduction of a lot, here is not a list, you can be interested in private message me

E. oke, the solution is ready, now you just need to gently Rebuild to make sure there is no field

2.Package Azure Application****

* * a. in solution you find you have already created good Bing. Test. Azure. WebService \

B. then right-click the Bing. Test. Azure. WebService project, click on the Package after vs will automatically pop up

  

C. Click Package and wait until success appears in the VS output window,

  

D. after successful vs automatically in the Windows for you to open a folder, which contains (‘ Bing. Test. Azure. WebService. CSPKG ‘and’ ServiceConfiguration. Cloud. CSCFG ‘) these two files

3.Package Azure Application

A. Open the browser, go to Manage.windowsazure.com, and log in to the registered Microsoft Account

B. Log in to CLOUD SERVICES in the navigation tree. Click on it

  

Note: because I work in a foreign company, the company has signed a confidentiality agreement. This is our own site, so some information is blurred

C. After completing Step B, the site you want to deploy will appear and click

D. Then click ‘DASHBOARD’

  

E. On the Dashboard page, click ‘STAGING’.

  

Note: Here we can see the CPU and memory details

F. There is an ‘UPDATE’ in the bottom, click the UPDATE button

  

G. Upload the files from the previous click package, and go through the highlighted parts in sequence

  

H. What follows is a long wait. After the wait is successful, you can access it according to your URL

  ,

I. When there is a success sign, you can pack up and go home.

 

 

All contents of this article are original, welcome to enjoy reading and discussion, reprint must indicate the source, otherwise the legal liability

Since the company has a serious problem with confidentiality, all the pictures above have been dealt with. If there is any problem, please comment or send a private message.

For the record: all comments and messages will be answered as soon as possible. You are welcome to correct your mistakes and make progress together

If the blog feedback is good or the garden friends like Microsoft cloud, then I will continue to update Azure knowledge.

 

About the author: Focus on basic platform project development. If you have any questions or suggestions, please feel free to comment! Copyright notice: The copyright of this article belongs to the author and the blog garden, welcome to reprint, but without the consent of the author must retain this statement, and give the original text link in a prominent place on the page of the article. For the record: all comments and messages will be answered as soon as possible. You are welcome to correct your mistakes and make progress together. Or direct private message I support the blogger: if you think the article is helpful to you, you can click on the lower right corner of the article [recommendation]. Your encouragement is the author to adhere to the original and continuous writing of the biggest power! \