次の方法で共有


Getting Started Integrating Windows Azure with Microsoft Office Solutions

Nearly everyone starts learning anything new by beginning with something simple and adding incremental knowledge. One of the biggest challenges with Windows Azure and SQL Azure is that the simple beginning seems a bit more elusive. The "Hello World" application in the new world of cloud computing, while not overly complex in concept, requires a good measure of preparation and configuration.

The following content is designed to aid you in getting started with Windows Azure and SQL Azure in the spirit of "Hello World" beginnings. By following these steps you will be able to:

1. Get a Windows Azure account and purchase a (free) plan

2. Set up your development environment locally

3. Create a simple cloud service with an accompanying ASP.NET application that will serve up some data

4. Test the application locally

5. Publish the application to Windows Azure

6. Test the application in the cloud

7. Create a SQL Azure database

8. Migrate a local database to SQL Azure

9. Configure an ASP.NET application to consume the SQL Azure data

I wanted to thank every person whose content on the Internet helped me when I was getting started with Windows Azure, but the list actually became really long. So, if you are one of the intrepid souls who has posted a blog entry about Windows Azure in the past 12 months, there is a good chance I read it, and I thank you! I've added links to some of that content at the end of this post.

All mistakes herein, if any, are my own. Please alert me to potential errors.

Set Up Environment

https://www.microsoft.com/windowsazure/getstarted/

Requirements

OS

Windows 7, Windows 2008 Server, Windows Vista (SP1)

IIS

IIS 7 with ASP.NET and WCF enabled

SDK

Install SDK 1.1

Purchase A Plan

Introductory Special

Compute

25 hours

Storage

500 MBs of storage

Storage Transactions

10,000 storage transactions

SQL Web DB

1 Web Edition db less then 1GB

Access Control

100,000 Access Control transactions

Service Bus

2 Service Bus connections

Note: You'll need a Windows Live ID to purchase plan and get things going.

Create Service In Azure

Make sure to run Visual Studio as Administrator

clip_image001

Give your service a meaningful name and description

clip_image003

Configure the service

· Give it a public service name

· Make it not restricted to any location unless you think you need it.

·

clip_image005

Press Create

clip_image006

Create Visual Studio Cloud Service Project

Make sure to run Visual Studio as Administrator

clip_image008

Choose File | New | Project in Visual Studio

clip_image010

Add Web forms to Web Role

clip_image012

Add Code

clip_image014

Test Cloud Service Project

Press F5 to debug

clip_image015

View Web role in action

clip_image017

Publish Cloud Service Project to Azure

Select Cloud Service project and press Build | Publish

clip_image019

Go to Windows Azure control panel and in Hosted Service section, go to Staging and press Deploy.

clip_image020

Specify the Configuration and Definition files in the console

clip_image021

Navigate to application

Create SQL Azure Database

In Windows Azure console go to SQL Azure section and choose Create Database

clip_image023

Give your database a name

clip_image024

Configure admin credentials

clip_image026

Connect to Local Database in Visual Studio

For example: add LINQ to SQL class

clip_image028

Connect to local database table(s)

clip_image029

Add table(s) to class

clip_image031

Configure code to serve up the data

clip_image032

Test Web role project

Move Local Database to SQL Azure

Prepare database for migration

· Each table must have clustered index

· SQL Azure does not accept all commands

Use SQL Management Studio

clip_image033

Optional: Use SQL Azure Migration Wizard. Major props to Wade Wegner for taking this on.

clip_image035

Optional: Script database

· Generate script for database from SQL Server

· Alter script to conform to SQL Azure restrictions

Change connection settings in Web.config file for Web role project

clip_image036

Publish Updated Cloud Service Project to Azure

Select Cloud Service project and press Build | Publish

clip_image037

Go to Windows Azure control panel and in Hosted Service section, go to Staging and press Update.

clip_image020[1]

Specify the Configuration and Definition files in the console

clip_image021[1]

Navigate to application

From here, we need to now hook this database up to our Microsoft Office 2010 solution. That part is actually much easier than you may think! I'll show you now next.

More Resources

Technorati Tags: Microsoft,Office 2010,Devleoper,Office,Productivity,Windows Azure,SQL Azure,DevDays 2010

Rock Thought of the Day:   Listen to The Thermals "Power Doesn't Run On Nothing". This song is like a transplant from 1978 into 2006-very punktastic.

Rock On