Bidirectional Communication Between Directives and Controllers in Angular

In Angular, it’s very easy for a directive to call into a controller. Working in the other direction – that is, calling a directive function from the controller – is not quite as intuitive. In this blog post, I’ll show you an easy way for your controllers to call functions defined in your directives in your Angular applications.

Like I said, calling a controller function from a directive is straightforward. You simply define a “callback” function in the controller and pass it to the directive (using the ‘&’ symbol in the isolated scope definition). It’s then trivial for the directive to invoke the function, which calls into the controller. To put things in .NET terms, this is akin to a user control (the directive) raising an event, which the user control’s host (the controller) can handle.

For example, you may want your directive to call your controller when the user clicks a button defined inside the directive’s template:

myPage.html

<div ng-controller=”myController”>
    <my-directive on-button-click=”vm.directiveButtonClicked()” />
</div>

myController.js

function myController($scope) {
    var vm = this;
    vm.directiveButtonClicked = function () {
        // Controller reacting to call initiated by directive
        alert(‘Button was clicked in directive’);
    }
}

myDirectiveTemplate.html

<button ng-click=”buttonClicked”>Click Me</button>

myDirective.js

function myDirective() {
    return {
        restrict: ‘E’,
        templateUrl: ‘/Templates/myDirectiveTemplate.html’,
        scope: {
            onButtonClick: ‘&’
        },
        link: link
    };

    function link(scope, element, attrs, controller) {
        scope.buttonClicked = function () {
            // Button was clicked in the directive
            // Invoke callback function on the controller
            scope.onButtonClick();
         }
     }
}

Unfortunately, there is no clearly established pattern in Angular for communicating in the opposite direction (calling functions of the directive from the controller). Again, in .NET terms, it’s easy for a user control’s host (the controller) to invoke public or internal methods defined by the user control (the directive). But there is no native way to achieve the same thing in Angular, which is certainly curious, because this is not an uncommon requirement.

Several solutions to this problem can be found on the web, but most of them carry caveats and/or add unwanted complexity. Some work by using $watch, but $watch is undesirable and should generally be avoided when possible. Others work, but not with isolated scope, which means you won’t achieve isolation across multiple instances of the directive.

Fret not! I’m going to show you a simple, lightweight technique that will enable your controllers to call functions on your directives, without resorting to $watch, and with full support for isolated scope.

Here’s how it works:

  1. The controller defines a view-model object named “accessor” with no members
  2. The page passes this object to the directive, via an attribute also named “accessor”
  3. The directive receives the accessor, and attaches a function to it
  4. The controller is now able to call the directive function via the accessor

Let’s demonstrate with an example. The directive template has two text boxes for input, but no button. Instead, there is a button on the page that is wired to a handler on the page’s controller. When the user clicks the button, the controller calls the directive. In response, the directive prepares an object with data entered by the user in the text boxes and returns it to the controller.

myPage.html

<div ng-controller=”myController”>
    <my-directive accessor=”vm.accessor” />
    <button ng-click=”vm.callDirective()”>Get Data</button>
</div>

myController.js

function myController($scope) {
    var vm = this;
    vm.accessor = {};
    vm.callDirective = function () {
        if (vm.accessor.getData) {
            var data = vm.accessor.getData();
            alert(‘Data from directive: ‘ + JSON.stringify(data));
        }
    };
}

myDirectiveTemplate.html

Name: <input type=”text” ng-model=”name” /><br />
Credit: <input type=”text” ng-model=”credit” /><br />

myDirective.js

function myDirective() {
    return {
        restrict: ‘E’,
        templateUrl: ‘/Templates/myDirectiveTemplate.html’,
        scope: {
            accessor: ‘=’
        },
        link: link
    };

    function link(scope, element, attrs, controller) {
        if (scope.accessor) {
            scope.accessor.getData = function () {
                return {
                    name: scope.name,
                    credit: scope.credit
                };
            };
        }
    }
}

Notice how the controller defines vm.accessor as a new object with no members. The controller’s expectation is that the directive will attach a getData function to this object. And the directive’s expectation is that the controller has defined and passed in the accessor object specifically for this purpose. Defensive coding patterns are employed on behalf of both expectations; that is, we ensure that no runtime error is raised by the browser in case the controller doesn’t define and pass in the expected accessor object, or in case the directive doesn’t attach the expected function to the accessor object.

The accessor pattern described in this blog post simplifies the task of bi-directional communication, making it just as easy to call your directive from your controller as it is to call in the other direction.

Happy coding!

 

 

Just Published: Microsoft Azure SQL Database Step by Step

I’m extremely pleased to announce that my new book on Microsoft Azure SQL Database has just been published! The book, part of the Microsoft Press “Step By Step” series, is designed for readers to quickly get productive with Microsoft Azure SQL Database — the cloud version of SQL Server.

WP_20140713_001

I’m especially lucky to have worked with Eric Boyd, who has co-authored the book with me. Eric has great knowledge and experience with the Azure platform, which really shines through in his chapters.

So who is this book for? Well, anyone interested in quickly getting up and running with SQL Database on Microsoft Azure. This includes not only those experienced with SQL Server, but readers having general experience with other database technologies, and even those with little to no experience at all. The Step By Step series follows an inviting format that’s chock full of quick rewards — small bits of conceptual information are presented, and that information is then immediately put to practical use by walking through a relatively short procedure, one step at a time.

Here are just some of the great things we cover:

  • Quick-Start, Setup, and Configuration
  • Security in the cloud
  • Reporting Services in the cloud
  • SQL Data Sync
  • Migration and Backup
  • Using the online management portal, and familiar tools like SSMS and SSDT
  • Programming using such tools as the Entity Framework ORM layer
  • Scalability and Performance
  • Differences from on-premise SQL Server

Of course, even as these pages come hot off the press, Azure continues to evolve. On to the next edition?…

 

Observations of a SQL Saturday Speaker

I enjoy speaking at SQL Saturday events every chance I get. I’ve spoken at well over a dozen of them by now, both in the U.S. and abroad. Every SQL Saturday is different, and that’s part of the charm of course. Organizers (all volunteers) work hard to make sure everything runs smoothly. Still, on occasion, problems can arise, and in some cases, these are problems that can be avoided. For you SQL Saturday organizers out there planning your next event, here are some tips based on personal experience that can help ensure success:

  • Notify speakers of agenda changes
    • On occasion, the agenda needs to be changed, which is understandable. However, if this happens, always be sure to notify the affected speakers (or all speakers). This is especially important when the changes are last-minute. Don’t assume speakers double-check the web-site to look for last-minute changes the day before your event
  • Don’t assume all speakers are local
    • When providing directions, don’t use general references like “the east entrance of the parking garage.” Out-of-towners tend to be directionally challenged!
  • Include proper location details
    • Be as specific as possible and include all relevant details, such as the floor, when pertinent. If the event is being hosted at a university, don’t just advertise the general address for the entire campus; specify the exact building address or building name.
  • Provide organizer contact phone number
    • Having no one to call in the event of a problem right before (or during) the event can pile more stress on an already stressful situation. Make sure that every speaker has a name and phone number they can contact if necessary.
  • Don’t assume every shows up in the morning
    • Very often, SQL Saturday signs are placed near and around the venue. These signs are very helpful, so they shouldn’t be taken down in the middle of the day. Some attendees (and speakers) make only be able to arrive for the latter part of the day, and they also need to benefit from the signs.

 

Using PowerShell to Manage Windows Azure SQL Database

PowerShell is Microsoft’s modern scripting language for system administration that supports a wide variety of tasks by executing commands (known as cmdlets, pronounced command-lets) from the PowerShell command line. Microsoft has also developed PowerShell cmdlets for managing Microsoft Azure, including a number of useful SQL Database commands. In this post, I’ll show you how to get started using these cmdlets.

Even if you already have PowerShell installed, these special cmdlets for Microsoft Azure need to be installed separately. The following instructions describe how to download and install the cmdlets.

Installing the Microsoft Azure PowerShell cmdlets

To install the Microsoft Azure PowerShell cmdlets, follow these steps:

  1. Navigate your web browser to https://www.windowsazure.com/en-us/downloads.
  2. Scroll down to Command-Line Tools, and click the Install link beneath Windows PowerShell.
    F02xx13-markedup
  3. When prompted to run or save, click Run.
  4. If the User Account Control dialog appears, click Yes.
  5. In the Web Platform Installer dialog, click Install.
    F02xx14
  6. Click I Accept to start the installation.
  7. When installation completes, click Finish.
  8. Click Exit to close the Web Platform Installer dialog.

Using the PowerShell Integrated Scripting Environment

Although you can use a simple text editor (even Notepad) to write PowerShell scripts, the PowerShell Integrated Scripting Environment (ISE) is a much more productive environment. As you’ll see, it offers some nice features, such as syntax highlighting and IntelliSense-style auto-completion.

PowerShell can be launched from the command line. To start the PowerShell ISE and view help information for the Azure SQL Database cmdlets, follow these steps:

  1. Open a command prompt.
  2. At the command prompt, type powershell_ise.
  3. At the PowerShell ISE prompt, type get-help get-azuresql, and then pause. In a moment, a popup window appears showing all the cmdlets that start with get-azuresql.
    F02xx15
  4. Double-click on any of the cmdlets to complete the command, and then press Enter to view help for the selected cmdlet.

Configuring PowerShell for your Microsoft account

Before you can start using PowerShell to manage Azure, you need to configure it for your account. This is simply a matter of logging in to the portal, and then running a few PowerShell commands to retrieve your account information from Azure and import it into PowerShell. This section walks you through the process.

To configure PowerShell for your Microsoft account, follow these steps:

  1. Log in to the Microsoft Azure portal at https://manage.windowsazure.com. This step is necessary for PowerShell to identify your account. If you don’t log in first, you will be prompted to log in when you try to retrieve your account settings in PowerShell.
  2. Start the PowerShell ISE, as explained in the previous procedure.
  3. Type Get-AzurePublishSettingsFile to retrieve your account settings. Internet Explorer will open up automatically and download a .publishsettings file with your account information.
  4. Click Save to save the .publishsettings file to your default Downloads folder.
    Important: The .publishsettings file should be kept safe and private, because it effectively provides access to the Azure subscriptions on your Microsoft account.
  5. Back in the PowerShell ISE, type Import-AzurePublishSettingsFile <.publishsettings file>, where <.publishsettings file> is the complete file name (with path) of the account settings file you just saved to your default Downloads folder. (This is typically C:\Users\<username>\Downloads\<subscription-name>.publishsettings.)

The PowerShell ISE doesn’t boast with a message when the settings are imported successfully. You’ll only get an error message if it fails. Otherwise, you’ll know that all went well if you are silently returned back to the PowerShell command-line prompt.

You are now ready to create a server, and then you can create a database on that server.

Creating a new server

First, create a new server and add a firewall rule for your IP address so that the server will allow you to connect to it using PowerShell. To do this, follow these steps in the PowerShell ISE:

  1. Type New-AzureSqlDatabaseServer –Location “East US” –AdministratorLogin “<new-login>” –AdministratorLoginPassword “<new-password>, where <new-login> and <new-password> are the credentials you want to assign for the new server. The server is created, and PowerShell responds by displaying the new server name.
    F02xx16
  2. Type New-AzureSqlDatabaseServerFirewallRule –ServerName <server-name> –RuleName <any-name> –StartIpAddress <your-ip-address> –EndIpAddress <your-ip-address>, where <server-name> is the name of the new server created in step 1, <any-name> is an arbitrary name for the new rule (no spaces permitted), and <your-ip-address> is the IP address of your machine. This command creates a new firewall rule to allow PowerShell access to the server from your IP address. If you don’t know your IP address, you can find out what it is by visiting whatismyipaddress.com.
    F02xx17

Creating a new database

The New-AzureSqlDatabase cmdlet creates a new database. Before you can use this cmdlet, you must first create an object with your credentials, and then you use those credentials to create a context associated with the server that you want to create the new database on. You store the server context in a variable, and then you specify the server context variable with the New-AzureSqlDatabase cmdlet to create the database (as well as all other cmdlets you might run for that particular server).

To create a new database now, follow these steps in the PowerShell ISE:

  1. Type $creds = new-object System.Management.Automation.PSCredential(“<login-name>“, (“<login-password>” | ConvertTo-SecureString –asPlainText –Force)), where <login-name> and <login-password> are the administrator login and password you assigned when you created the server in the previous procedure. This stores those administrator credentials in a secure string named $creds.
  2. Type $context = New-AzureSqlDatabaseServerContext –ServerName <server-name> –Credential $creds, where <server-name> is the name of the server you created in the previous procedure. (The server name is displayed when you create the server) This creates a context associated with the credentials you created in step 1 and the server you created in the previous procedure, and it stores that context in an object named $context.
  3. Type New-AzureSqlDatabase –Context $context –DatabaseName MyNewDb. This creates a new database named MyNewDb. The database is created on the server associated with $context, using the credentials associated with $creds. When the database is created, PowerShell displays information about the new database.
    F02xx18
  4. It’s often useful to view all the databases that exist on the server. To do so, type Get-AzureSqlDatabase –Context $context. As shown by this cmdlet’s output below, the server includes a master database, just as an on-premises SQL Server does.
    F02xx19

The database you just created with New-AzureSqlDatabase is, by default, a Web edition database with a maximum size of 1 GB and the default collation. This is the same type of database that gets created when you use Quick Create in the Microsoft Azure management portal. To override these defaults, specify the –Edition, –MaxSizeGb, and –Collation switches with an edition, maximum size, and collation of your own choosing. For example, the following statement creates a Business edition database with a maximum size of 150 GB (the largest possible):

New-AzureSqlDatabase –Context $context –DatabaseName MyBigDb -Edition Business -MaxSizeGB 150

You can also change the edition and maximum size (but not the collation) of an existing database by using the Set-AzureSqlDatabase cmdlet with the –Edition and –MaxSizeGb switches. For example, you can use the following command to reconfigure the MyNewDb database you just created as a Business edition database with a maximum size of 20 GB:

Set-AzureSqlDatabase -Context $context -DatabaseName MyNewDb -Edition Business -MaxSizeGB 20

Deleting a database

The Remove-AzureSqlDatabase cmdlet deletes a SQL Database. To delete the MyNewDb database you just created in the previous section, follow these steps:

  1. Type Remove-AzureSqlDatabase –Context $context –DatabaseName MyNewDb.
  2. When prompted to confirm, click Yes.

If you are using Remove-AzureSqlDatabase to write scripts you intend to run with no user intervention, you can include the –Force switch. This switch causes the database to be deleted immediately, without being prompted to confirm.

There’s a lot more you can do with these PowerShell cmdlets of course, so be sure to explore all the help topics to learn about all the other supported functionality!

 

Downloading SQL Server Express Edition

I’m often asked how to install SQL Server Express Edition, and what the different download options are. So I finally decided to explain it all in this blog post.

There are several SQL Server Express Edition downloads available on the Microsoft site, and they are available in both 32-bit and 64-bit versions. You can choose to install just the SQL Server Express database engine (and nothing else), or you can choose one of two other (larger) downloads: Express With Tools (which includes SQL Server Management Studio [SSMS]) or Express With Advanced Services (which includes SSMS, Full Text Search, and Reporting Services). There are also separate downloads for SSMS and LocalDB, but these do not include the SQL Server Express database engine needed to host local databases.

To install the SQL Server Express Edition database engine, follow these steps:

  1. Open Internet Explorer, and navigate to http://www.microsoft.com/en-us/download/details.aspx?id=29062.
  2. Click the large orange Download button.
  3. Select the appropriate download for your system.
    1. For 64-bit systems, choose ENU\x64\SQLEXPR_x64_ENU.exe.
    2. For 32-bit or 64-bit WoW systems, choose ENU\x86\SQLEXPR32_x86_ENU.exe.
    3. For 32-bit systems, choose ENU\x86\SQLEXPR_x86_ENU.exe.Note If you need to download SQL Server Management Studio (SSMS) as well, choose the Express With Tools file instead, which is the one that includes WT in the filename.
      F00xx01
  4. Click Next.
  5. If you receive a pop-up warning, click Allow Once.
    F00xx02-markedup
  6. When prompted to run or save the file, choose Run. This starts and runs the download.
  7. If the User Account Control dialog appears after the download files are extracted, click Yes.
  8. In the SQL Server Installation Center, click New SQL Server Stand-Alone Installation.
    F00xx03-markedup
  9. In the SQL Server 2012 Setup wizard, do the following:
    1. On the License Terms page, select I Accept The License Terms and click Next.
    2. On the Product Updates page, allow the wizard to scan for updates, and then click Next.
    3. On the Install Setup Files page, wait for the installation to proceed.
    4. On the Feature Selection page, Click Next.
    5. Continue clicking Next through all the remaining pages until the Installation Progress page, and wait for the installation to proceed.
    6. On the Complete page indicating a successful setup, click Close.
      F00xx04

I hope these instructions help you choose the right installation option for SQL Server Express Edition!

 

 

 

 

Creating a New SQL Database on Windows Azure

In my previous post, I showed you how to sign up for a Windows Azure subscription. Once you’ve got your subscription, it’s easy to create a SQL Database, which is very much like an ordinary SQL Server database hosted in the cloud. In this post, I’ll show you how. Essentially, you first need to create a server on Windows Azure, and then you can create the database on that server.

Creating a server

It’s easy to create a server, which is akin to an instance of SQL Server in the sense that it can host multiple databases. All you need to do is create an administrator account user name with a strong password, and specify the geographical region where the server should be located physically. To achieve the best performance, you should choose the region closest to your consumers. You will also want to be sure that any Windows Azure cloud Web sites and services you create are hosted in the same region as the SQL Database servers they communicate with. By locating both in the same region, you will avoid the bandwidth-based fee that gets incurred when your cloud sites, services, and databases communicate across different Azure regions. You will also reduce latency, which results in perceivably better performance.

SQL Database also has special firewall rules you can set to control exactly which computer or computers can access your database server in the cloud. Minimally, you’ll need to add a rule granting access to the IP address of your computer so that you can access the server from your local machine. For production, you might need to add rules granting access to blocks of IP addresses.

Follow these steps to create a new server:

  1. Log in to the Windows Azure portal at https://manage.windowsazure.com. This brings you to the main portal page showing ALL ITEMS.
    F01xx03
  2. Click SQL DATABASES in the vertical navigation pane on the left, then click SERVERS at the top of the page, and then click CREATE A SQL DATABASE SERVER.
    F01xx04-markedup
  3. Provide a new server login name—for example, saz.
  4. Supply a password for the new server, and then reenter it to confirm. Typical strong password guidelines apply, which require you to use a combination of mixed case, numbers, and symbols.
  5. Choose a region from the drop-down list—for example, East US. For best performance, pick the region you are located in or nearest to.
  6. Be sure to leave the ALLOW WINDOWS AZURE SERVICES TO ACCESS THE SERVER  check box selected. This makes the server accessible to other Windows Azure cloud services that you can create.
    F01xx05
  7. Click the checkmark icon on the lower-right side of the dialog to complete the settings. After just a few moments, the new server is provisioned and ready to use.
    F01xx06

If you’ve ever prepared a new server from scratch yourself, you can really appreciate the time and effort you just saved. This server is now available and ready to host databases in the cloud, and SQL Database has automatically assigned a randomly unique (but relatively short) name by which it can be accessed. But before access is granted, the server firewall must be configured. So the next step is to add a firewall rule so that you can connect to the server from your local machine.

The check box mentioned in step 6 added the special IP address 0.0.0.0, which allows cloud services running on Windws Azure to access the SQL Database server. However, you still need to add the IP address of your local machine to access the server from the SQL Database management portal and other tools (such as SQL Server Management Studio and SQL Server Data Tools in Microsoft Visual Studio).

To add a firewall rule for the IP address of your local machine, follow these steps:

  1. Click the server name, and then click the CONFIGURE link at the top of the page.
  2. To the right of your current detected IP address, click ADD TO THE ALLOWED IP ADDRESSES. A new firewall rule for your IP address is added.
    F01xx07-markedup
  3. Click SAVE at the bottom of the page.
  4. Click the back icon (the large back-pointing arrow) to return to the SQL DATABASES page for the new server.

You might need to wait a few moments for the new firewall rule to take effect, although typically it happens very quickly (often within five to ten seconds). If you don’t wait long enough, however, and the rule has not yet taken effect, you can be quite certain that you will not be able to connect to the server from your local machine until it does.

Creating a SQL Database instance

It will be just about as easy to create a database as it was to create the server. You simply need to choose a name for the new database, an edition, a database size, a default collation, and of course, the server to host the database on.

These settings can be easily changed later on. As part of the elastic scaling provided by SQL Database, you can freely switch back and forth between the Web and Business editions. You can also switch up and down between the sizes (1 GB or 5 GB for the Web edition, or 10 GB through 150 GB for the Business edition) as your changing needs dictate. And if 150 GB is still too small for you, you can partition your database using special sharding techniques.

Follow these steps to create a new SQL Database:

  1. In the Windows Azure portal, click the DATABASES link at the top of the page.
  2. Click CREATE A SQL DATABASE. This opens the NEW SQL DATABASE dialog.
  3. Type the name for the new database.
  4. Leave the default settings to create a Web edition database up to 1 GB in size using the SQL_Lating1_GeneralCP1_CI_AS collation.
  5. Choose the server you created in the previous procedure from the drop-down list.
    F01xx09
  6. Click the checkmark icon in the lower right of the dialog to complete the settings.

After a few more moments, the new database is created and ready to use.

F01xx10

And that’s all there is to creating a new SQL Database on Windows Azure!

 

 

 

 

Signing Up for Windows Azure

It’s easier than you think to get started with Windows Azure, and in this blog post, I’ll walk you through the steps. Once you’re signed up with a trial subscription, you’ll be able to explore all of the services available on Azure.

Basically, you need two things: a Microsoft account and a Windows Azure subscription. It’s quite possible that you already have a Microsoft account, which was formerly known as a Windows Live ID. This is the same account you might be using today for logging in to various Microsoft websites and services, such as Outlook.com, Hotmail, Xbox LIVE, Windows Phone, OneDrive (formerly SkyDrive), and other Microsoft offerings.

Creating a Microsoft account

The very first step before you can use any Windows Azure service is to acquire a Microsoft account if you don’t already have one. This is essentially an email address and password combination you will use to create and access your Windows Azure subscription. If you already have a Microsoft account, you can use it now to create a new Azure subscription. There’s no need to create another account, so you can just skip ahead to the next section, “Creating a Windows Azure subscription.” Otherwise, you’ll need to create one now.

If you already have a Microsoft account but you want to use a different email address for any reason, you still don’t need to create a new account. You can either rename the existing account or create an alias. See http://windows.microsoft.com/en-US/hotmail/get-new-outlook-address for more information.

If you do create a new Microsoft account, the user name can be an email address you already own. Alternatively, you can create a new email address for the account that ends either with @outlook.com or @hotmail.com. It really makes no difference which you choose, as long as the name you provide has not already been taken by someone else at either @outlook.com or @hotmail.com. If you do choose to create a new email address, you will also get a new mailbox account at that address, and Microsoft will communicate with you via that mailbox any time it needs to notify you about important information regarding your account.

Whether you use an existing email address or create a new one, you’ll also need to assign a strong password to protect the Microsoft account. Some additional personal information is also required, such as your name, gender, one of two forms of identity confirmation, your country, and your postal/Zip code.

Follow these steps to create your new Microsoft account:

  1. Using Internet Explorer, browse to http://signup.live.com. This displays the Create An Account page:
    F01xx01
  2. Provide your first and last names.
  3. For the Microsoft account user name (which is what you will be logging on to the Windows Azure portal with), provide an existing email address. Or click the Or Get A New Email Address link to create a new one available on either @outlook.com, @hotmail.com or @live.com.
  4. Supply a password, and then reenter it to confirm. The account requires a strong password of at least eight characters that must contain a combination of mixed case, numbers, and symbols.
  5. Provide your country and postal/Zip code, birthdate, and gender.
  6. Provide a phone number or alternate email address. You must provide at least one of these identity-confirmation methods.
  7. Type the random characters generated to prove that you’re a real person.
  8. Click the Create Account button.

If you created a new email address in step 3, a mailbox for it is immediately created and you are directed immediately to the Account Summary page. If you provided an existing email address, you will receive an email at that address from the Microsoft account team shortly after clicking Create Account. This email is sent to verify that you do, in fact, own the email address you provided. Your new Microsoft account will not become activated until you click on the verification link provided in the email.

Creating a Windows Azure subscription

Now that you have your Microsoft account, it’s time to create an Azure subscription. The subscription is essentially your Windows Azure billing account, and that opens the gateway to the full range of services available on Windows Azure.

In the procedure that follows, you will create a free trial subscription to Windows Azure. Currently, the free trial gives you $200 of credit for 30 days with access to all services. This requires providing credit card information that will be used to bill your subscription after your trial expires.

Note that Microsoft Azure pricing and special offers are subject to ongoing change. I strongly recommend that you visit http://www.windowsazure.com/en-us/pricing/purchase-options/ to review the latest pricing structures available. Furthermore, special pricing is available for MSDN subscribers. See http://www.windowsazure.com/en-us/pricing/member-offers/msdn-benefits/ for more information.

Follow these steps to create your new Windows Azure subscription:

  1. Using Internet Explorer, browse to http://www.windowsazure.com.
  2. Click the green Try For Free button.
  3. On the next page, click the green Try It Now button.
  4. If you are not already logged in to your Microsoft account, log in now.
  5. You will be taken to the Free Trial Signup page, as shown below.
    F01xx02
  6. Choose to either receive a text message or phone call as the method to receive a verification code.
  7. Enter the code received via the text message or phone call, and click Verify Code.
  8. Provide the credit card payment details for billing after the free trial expires.
  9. Select the box to indicate that you agree to all the terms.
  10. Click the green Sign Up button.

It takes just a few moments to complete setting up your new Azure subscription, and then you’re ready to get started working with Windows Azure services.

In future posts, I’ll show you how to get started with Windows Azure SQL Database, the cloud version of SQL Server.

Follow

Get every new post delivered to your Inbox.

Join 51 other followers