Windows Azure & .NET 4

Cloud Computing, Software Development February 10th, 2010

Many customers and developers ask me lately if it possible to running  ASP.NET 4.0 applications on Windows Azure. Most of them use VS2010 Beta 2 + November 09 Azure SDK.

The answer: Windows Azure currently supports .NET 3.5 SP1.

Tags:

Windows Azure Drive Beta Released

Cloud Computing February 4th, 2010

A beta release of Windows Azure Drive is now available. It was announced as XDrive at PDC 2009.Azure

With Windows Azure Drive, your Windows Azure applications running in the cloud can use existing NTFS APIs to access a durable drive. The Windows Azure application can read from or write to a drive letter (e.g., D:\) that represents a durable NTFS volume for storing and accessing data. For more information, see Beta Release of Windows Azure Drive on the Windows Azure Team Blog.

More detailed information can be found in the technical white paper here and at MSDN.

Using Windows Azure drive can significantly ease the migration of existing Windows applications to the cloud, enabling a more seamless migration experience while simultaneously reducing the amount of time it takes to move the applications from your own Windows environment to a Windows Azure environment.

In order to mount a Windows Azure Drive you will need to use Feb 2010 version of the Windows Azure SDK. The SDK provides the following Windows Azure Drive APIs for your Windows Azure application to use:

  • Create Drive – Creates a Page Blob formatted as a single partition NTFS volume VHD.
  • Initialize Cache – Allows an application to specify the location and size of the local data cache for all Windows Azure Drives mounted for that VM instance.
  • Mount Drive – Takes a formatted Page Blob and mounts it to a drive letter for the Windows Azure application to start using.
  • Get Mounted Drives – Returns the list of mounted drives. It consists of a list of the drive letter and Page Blob URLs for each mounted drive.
  • Unmount Drive – Unmounts the drive and frees up the drive letter.
  • Snapshot Drive – Allows the client application to create a backup of the drive (Page Blob).
  • Copy Drive – Provides the ability to copy a drive or snapshot to another drive (Page Blob) name to be used as a read/writable drive.

Enjoy!

Tags: ,

SQL Database Migration To SQL Azure

Cloud Computing February 2nd, 2010

Many customers are asking about migration from SQL to SQL Azure. This post will describe the considerations you have to take and the migration process.sql-azure-logo-lg

First of all, be familiar with SQL Azure limitations:

SQL Azure does not run in backward compatibility mode (SQL Server 2000 or SQL Server 2005). It is running compatibility mode 10 (SQL Server 2008).  Thus, all deprecated SQL Server 2000 and 2005 features will not work in SQL Azure (for the most part, there might be a few exceptions). 

If you work with SQL 2000/2005, first upgrade it to 2008 or SQL 2008 Express and get everything working there first. Then go through the migration process to SQL Azure.

Note that there are TSQL commands that are not supported by SQL Azure. There is a tool (SQLAzureMW) in codeplex (http://sqlazuremw.codeplex.com) that will analyze your database and also analyze SQL Profiler trace files (to cover your dynamic generated SQL) and tell you what is not compatible.  From there, you have a great start on figuring out what you need to do in order to get your database in SQL Azure.  Once your database is compatible, you can also use SQLAzureMW to actually migrate your database for you to SQL Azure. (SQLAzureMW requires SQL Server 2008 R2 CTP).

My recommendation is to start with SQLAzureMW and let it give you a rough idea of how much work you will need to do.  Then you can decide if you need to go through the upgrade process to SQL Server 2008 first before you go to SQL Azure.

Have fun!

Tags: ,

The World Summit of Cloud Computing

Cloud Computing, Events December 4th, 2009

Two days ago, at the annual conference of The World Summit of Cloud Computing (http://events.myreg.co.il/IGT2009/), organized by The Israeli Association of Grid Technologies (IGT) (http://www.grid.org.il), my college, Eliaz Tobias and myself, had the chance to co-present and speak on Microsoft’s recent announcements for the cloud.

Our presentation was part of the keynote which included a speakers from IGT, Martix, IBM & NetApp. This year, the IGT annual event focused on the business and technology aspects of Cloud Computing.

Our presentation included introduction of cloud computing, Software + Services, Windows Azure introduction, dynamic data center toolkit for private cloud (DDTK) and a real demo.

It was a great pleasure to present in such interesting and important conference. From the feedbacks we’ve got, people were very impressed from our roadmap and offerings for Public Cloud Windows Azure Platform, our Private Cloud with Dynamic Data Center Toolkit and services running on the cloud including Business Productivity Online Services (BPOS).

You can download the presentation from the “Presentations” page: http://blog.maordavid.com/presentations/

here are some pictures from the conference:

Eliaz during the presentation

Eliaz is presenting

I’m demonstrating Windows Azure

Maor David-Pur is demonstrating Windows Azure

Maor David-Pur is demonstrating Windows Azure

Maor David-Pur is demonstrating Windows Azure

Crowd

 

 

Tags: ,

AppFabric, Identity, Dallas Announced at PDC 09

Cloud Computing, Software Development November 18th, 2009

Here are the headlines from yesterday’s announcements at Professional Developers Conference (PDC09).PDC09Bling_BeforeAfter_136_3

Windows Identity Foundation, ASP.NET MVC Beta 2 Supported on Windows Azure

Windows Server virtual machine support on Windows Azure, RTM of Windows Identity Foundation, and ASP.NET MVC beta 2, a free, fully-supported framework that enables developers to rapidly build standards-based Web applications.

Windows Azure

Windows Azure release schedule was announced, the services are free to evaluate through January 2010. We will begin charging customers on February 1st, 2010.

Learn more, download the tools: http://www.microsoft.com/windowsazure/

Commercial, Reference Data Service Offered in Cloud

Dallas” the commoditization of data.Microsoft introduces an information and brokerage service, codenamed “Dallas” that enables access to commercial and reference data from partners including Associated Press, Citysearch, ESRI, DATA.gov, NASA, National Geographic, RiskMetrics Group, the United Nations, WaveMarket, Weather Central, and more. Check it out and request your trial token: http://blogs.msdn.com/dallas/archive/2009/11/17/a-quick-overview-of-dallas-for-developers.aspx

AppFabric Supports Moving Your Web Application from Windows Server to Windows Azure

Microsoft releases Windows Server AppFabric Beta 1, a set of integrated application services that enable developers to more easily deploy and manage applications spanning both server and cloud. Available for download today at http://msdn.microsoft.com/AppFabric with availability in 2010. Windows Server AppFabric and Windows Azure platform AppFabric include the capabilities from projects “Dublin” and “Velocity,” as well as the Service Bus and Access Control services that were formerly under the “.NET Services” brand (today, these services are now called Windows Azure platform AppFabric Service Bus and Windows Azure platform AppFabric Access Control services).

  • For Web applications, AppFabric provides caching capabilities to provide high-speed access, scale, and high availability to application data. This feature was previously codenamed "Velocity".
  • For composite applications, AppFabric makes it easier to build and manage services built using Windows Workflow Foundation and Windows Communication Foundation. This feature was previously codenamed "Dublin."

Tags: , , , , , ,

Windows Azure Service Management API Has Been Released

Cloud Computing September 21st, 2009

The Windows Azure Service Management API has been released to help you manage your deployments, hosted services and storage accounts. This is a REST-based API that uses X509 client certificates for authentication. Users can code against in their toolset of choice to manage their services. Users can upload any valid X509 certificate in .cer format to the Windows Azure developer portal and then use it as a client certificate when making API requests.

Supported operations:

  • Deployments – Viewing, creating, deleting, swapping, modifying configuration settings, changing instance counts, and updating the deployment.
  • Listing and viewing properties for hosted services, storage accounts and affinity groups.

A tool called csmanage.exe have already uploaded to help you interact with this API and manage your deployments. For an overview of the Management APIs, see Introducing the Windows Azure Service Management API blog posting from the Windows Azure team.

Tags:

Multi-Tenant Architecture @ Windows Azure Platform

Cloud Computing September 1st, 2009

common question is how a multi-tenant architecture works with Windows Azure Platform. You can find an answer at Project Riviera that has been released on MSDN and includes source code.windows_azure_small

From the project page:

Project Riviera is a comprehensive code sample to demostrate how to develop multi-tenant highly-scalable line-of-business application on  Windows Azure Platform. This sample is developed by Global Partner Architecture Team in Developer & Platform Evangelism group at Microsoft in collaboration with Cumulux - our Cloud ISV partner. Riviera uses Customer Loyalty Management scenario for illustration purpose but many building blocks are applicable to range of line-of-business applications.
Click here to view a screncast of Riviera, Architecture details and other related information.
Key features of Riviera

  • Multi-tenant data store based on Azure Table Storage as well as SQL Azure.
  • Per tenant customization of data model
  • Per tenant customization of business logic (using Windows Workflow in Windows Azure)
  • Per tenant customization of user interface using Silverlight 3.0. Customization can be multi-level – custom theme, custom XAML, and custom XAP.
  • Automated tenant provisioning
  • Windows Azure web role->Azure Queue->worker role pattern for high volume transaction processing that can scale on demand
  • Claims aware web service and web application using Geneva Framework
  • Active and Passive Federation using Geneva Framework, Geneva Server and .NET Access Control Service (ACS)
  • Windows Live ID authentication for consumer facing web site
  • Use of Patterns & Practices Enterprise Library Caching and Logging application blocks in Windows Azure

Notes

  • Project Riviera is not a product or solution from Microsoft. It is a comprehensive sample code developed for evangelism purpose.
  • Riviera includes implementation of Security Token Service (STS) using Geneva Framework in Windows Azure. We would like to emphasize that this scenario is currently not supported (at the time of July 2009 CTP). This is primarily because of lack of certificate store support in Windows Azure at this time. So although the implementation works in Windows Azure, we advise not to do so for production environment untill such scenario can be supported on Windows Azure and product group provides guidance to do so.

Tags:

New Version of Windows Azure Tools for Microsoft Visual Studio

Cloud Computing May 29th, 2009

Windows Azure Tools for Microsoft Visual  Studio extend Visual Studio 2008 and Visual Studio 2010 Beta 1 to enable the creation, building, debugging, running and packaging of Visual Studioscalable web applications and services on Windows Azure. Installation includes the Windows Azure SDK.

New for the May 2009 CTP:

  • Support for Visual Studio 2010 Beta 1
  • Update for Visual Studio 2008
  • Improved integration with the Development Fabric and Storage services to improve the reliability of debug and run of Cloud Services from Visual Studio
  • Enhanced robustness and stability

Windows Azure Tools for Microsoft Visual Studio includes:

  • C# and VB Project Templates for building Cloud Services
  • Tools to change the Service Role configuration
  • Integrated local development via the Development Fabric and Development Storage services
  • Debugging Cloud Service Roles running in the Development Fabric
  • Building and packaging of Cloud Service Packages
  • Browsing to the Azure Services Developer Portal
  • SSL Certificate selection

 

Download here

Tags:

Windows Azure Management Tool – MMC

Cloud Computing May 18th, 2009

Just released – Windows Azure MMC. The  Windows Azure Management Tool was created to manage your storage accounts in Windows Azure. Developed as a managed MMC, the tool allows you to create and manage both blobs and queues. Easily create and manage containers, blobs, and permissions. Add and remove queues, inspect or add messages or empty queues as well.

Windows Azure MMC

Features

The Windows Azure MMC makes it easy to work with your storage accounts. Here are just some of the features:

  • Manage multiple storage accounts
  • Easily switch between remote and local storage services
  • Manage your blobs
    • Create containers and manage permissions
    • Upload files or even entire folders
    • Read metadata or preview the blob contents
  • Manage your queues
    • Create new queues
    • Monitor queues
    • Read (peek) messages
    • Post new messages to the queue
    • Purge queues

Known Issues

  • The current release does not work with Windows 7 due to a bug in the RC version of PowerShell. Other OS versions should be unaffected.

Tags:

Azure .NET Services – A Twitter Service Bus

Cloud Computing April 29th, 2009

In this post I’ll demonstrate how to use the Microsoft .NET Services Service Bus and the .NET Service Bus NetTcpRelayBinding. The post based on the Echo sample in Azure SDK for .NET Services (March 2009 CTP).

What is a .NET Service Bus? it provides a relay service that makes it possible to establish connectivity through the cloud across organizational boundaries. This crucial infrastructure allows cloud-based workflows to communicate with on-premise applications by traversing firewalls and NAT devices.

The sample shows a simple service and client that communicate through the Service Bus. When the service application is started, it asks for your .NET Services Solution Credentials and opens an endpoint on the Service Bus. Once opened, this endpoint has a well-known URI on the Service Bus and is, irrespective of whether your machine is residing behind a Firewall or Network Address Translation, reachable from anywhere.

Configuring the Service

You configure the .NET Access Control Service through the administration portal provided within a particular solution. This is where you configure the rules that determine how it will issue claims for the users it knows about or as a result of transforming claims from other providers.

When using the .NET Service Bus, you’ll configure endpoints that use this Service Bus scope as the base URI (yours will be customized to your account, of course). Every solution comes preconfigured with a set of access control rules for both the .NET Service Bus and the .NET Workflow Service.

 

The Contract

Our service implements very simple contract that works as a Twitter wrapper. Currently there is only one method – CheckIfUserFollowMe that checks if a user follows you. (You can download the code and add other operations to the contract).

[ServiceContract(Name = "ITwitterContract", Namespace = "http://samples.maordavid.com/ServiceModel/Relay/")]
public interface ITwitterContract
{
    [OperationContract]
    bool CheckIfUserFollowMe(string user,string password,string friendScreenName);
}
public interface ITwitterChannel : ITwitterContract, IClientChannel { }

The Service

The service configuration file:

<configuration>
  <system.serviceModel>
    <services>
      <!-- Application Service -->
      <service name="Blog.MaorDavid.Samples.TwitterService">
        <endpoint contract="Blog.MaorDavid.Samples.ITwitterContract"
                  binding="netTcpRelayBinding" />
      </service>
    </services>
  </system.serviceModel>
</configuration>

The configuration file is just like any other WCF configuration file with the exception that configured service endpoint refers a "netTcpRelayBinding", which isn’t part of the .NET Framework. The NetTcpRelayBinding is one of the new bindings introduced with the Service Bus.

In order to hook a listening service into the Service Bus, the Service Bus service needs to be able to verify that the owner of the listening service is authorized to do so.

Authentication and authorization are both performed by the Microsoft .NET Services Access Control Service. In order to make these steps simple, the Microsoft.ServiceBus Framework contains a set of transport client credential helpers that automatically deal acquiring required security tokens.

// create the endpoint address in the solution's namespace
Uri address = ServiceBusEnvironment.CreateServiceUri("sb", solutionName, "TwitterService");

// create the credentials object for the endpoint
TransportClientEndpointBehavior userNamePasswordServiceBusCredential = new TransportClientEndpointBehavior();
userNamePasswordServiceBusCredential.CredentialType = TransportClientCredentialType.UserNamePassword;
userNamePasswordServiceBusCredential.Credentials.UserName.UserName = solutionName;
userNamePasswordServiceBusCredential.Credentials.UserName.Password = solutionPassword;

// create the service host reading the configuration
ServiceHost host = new ServiceHost(typeof(TwitterService), address);

// add the Service Bus credentials to all endpoints specified in configuration
foreach (ServiceEndpoint endpoint in host.Description.Endpoints)
{
    endpoint.Behaviors.Add(userNamePasswordServiceBusCredential);
}

// open the service
host.Open();

Console.WriteLine("Service address: " + address);
Console.WriteLine("Press [Enter] to exit");
Console.ReadLine();

// close the service
host.Close();

The credential used in this example is a simple Username/Password credential that is backed by the Solution credentials you set up when signing up for Microsoft .NET Services. Each Microsoft .NET Services solution automatically owns a branch of the Service Bus global namespace. "Your" Solution namespace branch is rooted at

[scheme]://solution-name.servicebus.windows.net/

whereby [scheme] is either "sb" (as in this example) or "http" or "https". The namespace owner can subdivide that namespace and organize services onto that namespace as needed and define rules in the Access Control Service to guard access to branches of the namespace.

When I run the host application, the WCF hosting infrastructure automatically authenticates with the .NET Access Control Service, acquires claims, and then opens an outbound port to the .NET Service Bus and registers a listener on the specified address. At that point, the locally hosted service will be ready to receive messages relayed through the .NET Service Bus on the specified address. I can also browse to the base address of the solution at this point to access the service registry feed and any active listener endpoints will appear in the feed.

The Client

The client configuration file will need to look just like the host configuration file. Only the endpoint definition will need to appear within the <client> section.

<configuration>
  <system.serviceModel>
    <client>
      <!-- Application Endpoint -->
      <endpoint name="RelayEndpoint"
                contract="Blog.MaorDavid.Samples.ITwitterContract"
                binding="netTcpRelayBinding"/>
    </client>

  </system.serviceModel>
</configuration>

When started, it asks for the Solution credentials, creates a channel to the Service and sends requests to the service.

// create the service URI based on the solution name
Uri serviceUri = ServiceBusEnvironment.CreateServiceUri("sb", solutionName, "TwitterService");

// create the credentials object for the endpoint
TransportClientEndpointBehavior userNamePasswordServiceBusCredential = new TransportClientEndpointBehavior();
userNamePasswordServiceBusCredential.CredentialType = TransportClientCredentialType.UserNamePassword;
userNamePasswordServiceBusCredential.Credentials.UserName.UserName = solutionName;
userNamePasswordServiceBusCredential.Credentials.UserName.Password = solutionPassword;

// create the channel factory loading the configuration
ChannelFactory<ITwitterChannel> channelFactory = new ChannelFactory<ITwitterChannel>("RelayEndpoint", new EndpointAddress(serviceUri));

// apply the Service Bus credentials
channelFactory.Endpoint.Behaviors.Add(userNamePasswordServiceBusCredential);

// create and open the client channel
ITwitterChannel channel = channelFactory.CreateChannel();
channel.Open();

Console.WriteLine("Welcome to the Twitter Client. To check if your friend is following you, please follow the instructions below;");
Console.WriteLine("Enter your Twitter user name:");
string twitterUserName = Console.ReadLine();
Console.WriteLine("Enter your Twitter password:");
string twitterPassword = MicrosoftSDKUtilities.ReadPassword();
Console.WriteLine("Enter your friend's Twitter user name:");
string friendTwitterUserName = Console.ReadLine();
try
{
    bool follow = channel.CheckIfUserFollowMe(twitterUserName, twitterPassword,friendTwitterUserName);
    if(follow)
        Console.WriteLine("Yes! You & {0} are friends!", friendTwitterUserName);
    else
        Console.WriteLine("Sorry...{0} doesn't follow you -:(", friendTwitterUserName);

}
catch (Exception e)
{
    Console.WriteLine("Error: " + e.Message);
}
Console.ReadLine();

channel.Close();
channelFactory.Close();

You can download the sample:

And this is what we get:

twitterSB

Enjoy!

Share this post :

Tags: ,