Geeks With Blogs
Shervin Shakibi's Blog blog

 

This is a follow up to my usergroup presentation I recently did for Gold Coast Usergroup recently. I have many emails, ok just 2 asking me to document my presentation so they can get started developing with windows Azure.

before you get started you need to make sure your development machine is running, Vista or Windows Server 2008 or my favorite windows 7, you also need to have IIS 7.0 with  WCF HTTP activation installed.

Next you will need to have Visual Studio 2008 or Visual Web Developer Express. please make sure you have the latest service packs  installed. This way you will have .NET .35 Sp1.

Next step is downloading all the necessary SDKs, the best way is to simply go to

clip_image001[7]

http://microsoft.com/azure and look for the link “Get tools & SDK” Download and install the SDK and Azure tools for Visual studio, while you are here you might want to bookmark this page, In addition  to tools and SDKs, there are tons of whitepapers and training videos and other resources available.

 

now we are ready to launch Visual Studio, since we installed windows azure tools for visual studio, we should be able to see windows Azure template projects under cloud Service. Lets select cloud Service, I’m going to name my solution MyFirstCloudApp. press OK and you should see the “New Cloud Service Project” window.

clip_image001[5]

Highlight “ASP.NET Web Role” and add it to your Cloud Service Solution by pressing > button, before pressing OK click on the pencil icon on the newly created ASP.NET web role to rename the project to MyCouldApp from the default WebRole1.

Two projects should have been created in your solution. MyCloadApp project is very similar to a standard ASP.NET web application project, but has been modified to work with Windows Azure.

View the contents of Servicedefinition.csdef and ServiceConfiguration.cscfg in the Project MyFirstCouldApp. 

 

clip_image001

 

The ServiceDefinition.csdef file contains the metadata needed by the Windows Azure fabric to understand the requirements of your application, such as which roles are used. It will also contain configuration settings that apply to all instances. .The ServiceConfiguration.cscfg file lets you set the values for the configuration settings and the number of instances to run for each role.


The Roles node in the Cloud Services project enables you to configure what roles the services include (Web, worker or both) as well as which projects are used for these roles.
Adding configuring roles through the Roles node will update the ServiceDefinition.csdef and ServiceConfiguration.cscfg files.

Open Default.aspx, and add some HTML I’m just going to add an THML tag <H1> and ASP Button and ASP Label control, idea here is that we are working with the ASP.net application .

Lets execute the service in Windows Azure by pressing F5 . The service will build and then launch the local development fabric

 

right click the Development Fabric icon in the system tray and seimagelect  Show Development Fabric UI.

click on the service Details view the service details, you should see a URL and IP address and port number, when you execute a windows Azure service it will try to allocate the port  specified in the ServiceDefinition.csdef if this port is not available, then next available port is used.

Click on the webrole and the instance 0, you should see the log for this instance.

switch back to visual studio and stop debugging, open ServiceConfiguration.cscfg and change the number of instances from 1 to 5, Press F5 and then switch to Development Fabric UI, now you should see 5 instances instead of one, you might have to refresh if you still see one instance.

Next week I will have another blog about deploying this app to the cloud.

Posted on Wednesday, November 4, 2009 12:32 PM | Back to top


Comments on this post: Getting Started with windows Azure development

No comments posted yet.
Your comment:
 (will show your gravatar)


Copyright © Shervin Shakibi | Powered by: GeeksWithBlogs.net