DCSIMG
February 2009 - Posts - Maor's Blog

February 2009 - Posts

עובר לעברית

אז זהו. אחרי שנה וחצי של כתיבת הבלוג באנגלית עם דגש מקצועי ופנייה לעולם כולו, החלטתי לשנות כיוון.

מהיום, הבלוג ייכתב בעברית וימוען לקהל הישראלי ודובר העברית בלבד. הבלוג יתמקד בטכנולוגיה, תוכנה ושאר ירקות שקשורים לחוויותי מתחום הזה.

מי שרוצה להמשיך ולקרוא את הגיגיי בתחום התוכנה או בקיצר, משהו דומה לבלוג הזה עד עכשיו ולקבל עדכונים על חידושים בתחום, דוגמאות קוד ונושאים מעניינים אחרים, מוזמן להכנס לבלוג ה msdn-י שלי: http://blogs.msdn.com/maor וכמובן להרשם ל RSS שלו: http://feeds.maordavid.com/msdnblog

אל תשכחו, ה RSS של הבלוג הזה גם כן השתנה והוא: http://feeds.maordavid.com/msil

מקווה שתמצאו תכנים מעניינים ואם לא – תגיבו, שלחו אימייל…

נשתמע,

מאור

RSS Feed Address Has Changed

Effective immediately, the RSS feed for this blog is being changed. If you have subscribed to this blog in a RSS Reader, please update your settings to reflect the new feed address at: http://feeds.maordavid.com/msil

http://feeds.maordavid.com/msil

rss

Deploying Azure Project To The Cloud

In this post I’ll explain the steps required to host a cloud service in the cloud…

Step 1: Creating the project on Azure Services Developer Portal

In order to host the asp.net cloud application I created in the previous post, I should login into Windows Azure Services Developer Portal. Because I created cloud service, I have to choose a new Hosted Service Project.

newHostedService 

I’ll give a label and description to the service:

CreateProject_1

And give it a name…

CreateProject_2

Finally, we have a project.

CreateProject_3

Note: the Application ID will be needed in order to package and publish the application from Visual Studio.

 

Step 2: Deploying from Visual Studio to the Cloud

In Visual Studio we have to open the properties window of the cloud service. There is a tab called Portal.

VS1

To make sure the correct web page on the Azure portal is opened, we should paste the Application ID from the previous step.

Now, we can publish it to the cloud!

VS_Publish

 

Choosing the Publish action opens up the folder in which the application has been packaged and opens up the browser with the application properties page.

publishBin

 

CreateProject_3

Selecting the Deploy button will open the Deployment page – there we can locate both the package file (.cspkg) and the configuration settings file (.cscfg).
deploymentPage

 

After clicking Deploy – the application deployed to the cloud and initialized.

staging

Now we can test it on a staging environment by clicking the Web Site URL. When the application is ready to be published to production just press the switch icon to move from staging to production.

You can navigate to: http://maorsblog.cloudapp.net/Default.aspx

 

Enjoy!

Creating and Executing First Cloud Project With Windows Azure

The Azure™ Services Platform (Azure) is an internet-scale cloud services platform hosted in Microsoft data centers, which provides an operating system and a set of developer services that can be used individually or together. Azure’s flexible and interoperable platform can be used to build new applications to run from the cloud or enhance existing applications with cloud-based capabilities. Its open architecture gives developers the choice to build web applications, applications running on connected devices, PCs, servers, or hybrid solutions offering the best of online and on-premises.

In this post we will create simple web site and execute it in the local development fabric. The Development Fabric simulates the Windows Azure fabric on your local machine so that you may run and test your service locally before deploying it.

Learn how to initialize the development fabric here.

Pre-requisites for this post:

  • Windows Vista SP1 / Windows Server 2008
  • IIS 7 with ASP.NET
  • Microsoft Visual Studio 2008
  • Microsoft .NET Framework 3.5 SP1
  • Windows Azure SDK 1.0.0
  • Windows Azure Tools for Microsoft Visual Studio 1.0
  • Note, you can use the Microsoft Web Platform Installer to get all the prerequisites.

    Creating the project

    After installation of the SDK and VS tools, new project templates are available in Visual Studio.

    NewCloudService

    You will use the Windows Azure Tools for Microsoft Visual Studio to create the project using the Cloud Service project templates. These tools extend Visual Studio 2008 to enable the creation, building and running of Windows Azure services.

    For a Hosted Windows Azure project you have the possibility to create a Web Cloud Service or a Worker Cloud Service. A single project may contain one of each but no more.

    For now I’m going to create a Web Cloud Service which is an ASP.NET Forms application.

    azureSln

    The MyFirstAzureService_WebRole project is a standard ASP.NET Web Application project template that has been modified to work with Windows Azure. This contains the bulk of the project.
    The MyFirstAzureService project contains a reference to the ASP.NET project, along with ServiceDefinition.csdef and ServiceConfiguration.cscfg files. 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. These configuration settings can be read using the Windows Azure API. 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.

    Lets modify the default.aspx page, then build and execute the site in the development fabric.

    azureSite

    To show the development fabric UI, right-click its icon in the system tray and select Show Development Fabric UI.

    fabricUIBoble

     

    Windows Azure development fabric

    developmentFabric

    Expand the tree on the left panel to see the WebRole instances. Click on the node with the 0 label. This shows the log for this instance. Also, we can see here that my Web Role is started.

    That's all! Now that our website is running locally we can go and publish this to the cloud (if we registered to Windows Azure) or explore some of the Windows Azure API and development fabric features as Configuration, Logging, and Debugging – This will be in the next post.

    Enjoy!

    Search

    Go

    This Blog

    News

      RSS

       

      Connect with Me

      Maor's Facebook profile  Follow Maor on Twitter  Maor's profile on Linkedin  Maor in FriendFeed 
             

    Syndication