Create Your Next Application and Database in the Cloud
page 5 of 6
by Vince Varallo
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 24913/ 62

Step 4: Deploy the Solution to the Cloud

1.    Before you deploy your project to the Cloud you need to create a Service Package using Visual Studio 2010.  This is done by right clicking on the "ASPAllianceSample" node in your solution explorer.

2.    Select Publish from the pop-up menu.  You should see the Publish Cloud Service dialog box.

3.    Choose the option to "Create Service Package Only" and click the OK button.

4.    Visual Studio will create two files and open up Windows Explorer so you can upload them to the Windows Azure web site.  The two files are called ASPAllianceSample.cspkg and ServiceConfiguration.csfg.

5.    Open up Internet Explorer and navigate to

6.    Once you log in to your account you should see your home page.

7.    Click on the "New Hosted Service" button in the upper left hand corner of the page.

8.    This will display the "Create a new Hosted Service" dialog.

9.    Enter "ASPAllianceSample" for the name.

10. Enter "ASPAllianceSample" for the URL Prefix.  The URL Prefix must be unique across all sites so you'll have to append a number to the end of the prefix until the site tells you it is unique.  The name you enter here is the publicly available name that people will use to get to your web site.

11. Next, select a region where you want your site hosted.  I'll choose "Anywhere US" for this example but you may want to choose a region closer to your target audience.

12. Under "Deployment options" chose "Deploy to production environment".  You can deploy to the stage environment and then promote stage to production but for this example we'll just deploy directly to production.

13. Enter "ASPAllianceSample" for the "Deployment Name".

14. Now you need to upload the package and configuration files that were created by Visual Studio.  Click the "Browse Locally…" button on the respective sections to upload the files.

15. Now click the OK button.  You'll get a warning regarding the fact that there is only one role with one instance for this deployment.  You can ignore the warning by clicking the Yes button.

16. The hosted service will then be created after a several minutes.  The first time I did this it took about 10 minutes.

17. Once the service is created you can then open Internet Explorer and navigate to to see your application.  Remember to change the prefix in the URL to whatever you used when you created the URL Prefix in step 10.

18. Just when you thought you were done, you're not.  If you run the application you'll get an error.  This is because you have to create a firewall rule to allow the IP address of the hosted application to access the database.  To find out the IP address you'll need to look at the details of the error message.  To do this you'll can add a section to your web.config file and redeploy the application.  Add the following section to the <system.web> section

<customErrors mode="Off"></customErrors>

19. You'll need to save and then publish the configuration files again.  Once this setting is in place on your server you can navigate to the site and you should get the details of the error message in the default .NET error page.

20. You'll need to add this IP address to the list of allowed IP addresses in the firewall rules just as you did when you setup the database.

21. Once the firewall rule is in place you should be able to navigate to your application's URL and see the default page with the records from the database displayed.

View Entire Article

User Comments

Title: garland.kg69@asp.alliance/com   
Name: Kenneth A Garland III
Date: 2011-03-04 12:53:26 PM
I wish to have my own web-site in the cloud .
Title: Cloud at GoDaddy   
Name: Kevin Tweedy
Date: 2011-01-25 5:19:44 PM
Does anyone have any experience with the Cloud at a GoDaddy hosted area? None of their "Help" [s.i.c.] files reference the Cloud at all and in the past they've been extremely lagging in getting with "the latest and greates". Any pointers, info?

Product Spotlight
Product Spotlight 

Community Advice: ASP | SQL | XML | Regular Expressions | Windows

©Copyright 1998-2024  |  Page Processed at 2024-06-23 7:54:30 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search