Book Image

Microsoft Silverlight 5 and Windows Azure Enterprise Integration

By : David Burela
Book Image

Microsoft Silverlight 5 and Windows Azure Enterprise Integration

By: David Burela

Overview of this book

Microsoft Silverlight is a powerful development platform for creating rich media applications and line of business applications for the web and desktop. Microsoft Windows Azure is a cloud services operating system that serves as the development, service hosting, and service management environment for the Windows Azure platform. Silverlight allows you to integrate with Windows Azure and create and run Silverlight Enterprise Applications on Windows Azure This book shows you how to create and run Silverlight Enterprise Applications on Windows Azure. Integrating Silverlight and Windows Azure can be difficult without guidance. This book will take you through all the steps to create and run Silverlight Enterprise Applications on the Windows Azure platform. The book starts by providing the steps required to set up the development environment, providing an overview of Azure. The book then dives deep into topics such as hosting Silverlight applications in Azure, using Azure Queues in Silverlight, storing data in Azure table storage from Silverlight, accessing Azure blob storage from Silverlight, relational data with SQL Azure and RIA, and manipulating data with RIA services amongst others.
Table of Contents (19 chapters)
Microsoft Silverlight 5 and Windows Azure Enterprise Integration
Credits
About the Author
Acknowledgement
About the Reviewers
www.PacktPub.com
Preface

Consuming an Azure-hosted WCF service within a Silverlight application


A standalone Silverlight application will not be able to do much by itself. Most applications will require that they consume data from a data source, such as to get a list of products or customer orders. A common way to send data between .Net applications is through WCF Services.

The following steps will explore how to add a WCF service to your Azure web role, and then consume it from within the Silverlight application:

  1. 1. In Visual Studio, right-click on the ASP.Net web role project (WebRole1) and click on Add | New Item.

  2. 2. Add a new WCF service named HelloWorldService.svc as shown in the following screenshot:

  3. 3. Once the WCF service has been added into the project, three new files will be added to the project: IHelloWorldService.cs, HelloWorldService.svc, and HelloWorldService.svc.cs.

  4. 4. Open IHelloWorldService.cs and change the interface, so that it defines a single method named GenerateHelloWorldGreeting that takes no...