Windows Azure: Announcing release of Windows Azure SDK 2.2 (with lots of goodies)

Earlier today I blogged about a big update we made today to Windows Azure, and some of the great new features it provides.

Today I’m also excited to also announce the release of the Windows Azure SDK 2.2. Today’s SDK release adds even more great features including:

  • Visual Studio 2013 Support
  • Integrated Windows Azure Sign-In support within Visual Studio
  • Remote Debugging Cloud Services with Visual Studio
  • Firewall Management support within Visual Studio for SQL Databases
  • Visual Studio 2013 RTM VM Images for MSDN Subscribers
  • Windows Azure Management Libraries for .NET
  • Updated Windows Azure PowerShell Cmdlets and ScriptCenter

The below post has more details on what’s available in today’s Windows Azure SDK 2.2 release.  Also head over to Channel 9 to see the new episode of the Visual Studio Toolbox show that will be available shortly, and which highlights these features in a video demonstration.

Visual Studio 2013 Support

Version 2.2 of the Window Azure SDK is the first official version of the SDK to support the final RTM release of Visual Studio 2013. If you installed the 2.1 SDK with the Preview of Visual Studio 2013 we recommend that you upgrade your projects to SDK 2.2.  SDK 2.2 also works side by side with the SDK 2.0 and SDK 2.1 releases on Visual Studio 2012:

image

Integrated Windows Azure Sign In within Visual Studio

Integrated Windows Azure Sign-In support within Visual Studio is one of the big improvements added with this Windows Azure SDK release.  Integrated sign-in support enables developers to develop/test/manage Windows Azure resources within Visual Studio without having to download or use management certificates. 

You can now just right-click on the “Windows Azure” icon within the Server Explorer inside Visual Studio and choose the “Connect to Windows Azure” context menu option to connect to Windows Azure:

clip_image002

Doing this will prompt you to enter the email address of the account you wish to sign-in with:

clip_image004

You can use either a Microsoft Account (e.g. Windows Live ID) or an Organizational account (e.g. Active Directory) as the email.  The dialog will update with an appropriate login prompt depending on which type of email address you enter:

clip_image006

Once you sign-in you’ll see the Windows Azure resources that you have permissions to manage show up automatically within the Visual Studio Server Explorer (and you can start using them):

clip_image008

With this new integrated sign in experience you are now able to publish web apps, deploy VMs and cloud services, use Windows Azure diagnostics, and fully interact with your Windows Azure services within Visual Studio without the need for a management certificate.  All of the authentication is handled using the Windows Azure Active Directory associated with your Windows Azure account (details on this can be found in my earlier blog post).

Integrating authentication this way end-to-end across the Service Management APIs + Dev Tools + Management Portal + PowerShell automation scripts enables a much more secure and flexible security model within Windows Azure, and makes it much more convenient to securely manage multiple developers + administrators working on a project.  It also allows organizations and enterprises to use the same authentication model that they use for their developers on-premises in the cloud.  It also ensures that employees who leave an organization immediately lose access to their company’s cloud based resources once their Active Directory account is suspended.

Filtering/Subscription Management

Once you login within Visual Studio, you can filter which Windows Azure subscriptions/regions are visible within the Server Explorer by right-clicking the “Filter Services” context menu within the Server Explorer.  You can also use the “Manage Subscriptions” context menu to mange your Windows Azure Subscriptions:

image

Bringing up the “Manage Subscriptions” dialog allows you to see which accounts you are currently using, as well as which subscriptions are within them:

image

The “Certificates” tab allows you to continue to import and use management certificates to manage Windows Azure resources as well.  We have not removed any functionality with today’s update – all of the existing scenarios that previously supported management certificates within Visual Studio continue to work just fine.  The new integrated sign-in support provided with today’s release is purely additive.

Note: the SQL Database node and the Mobile Service node in Server Explorer do not support integrated sign-in at this time. Therefore, you will only see databases and mobile services under those nodes if you have a management certificate to authorize access to them.  We will enable them with integrated sign-in in a future update.

Remote Debugging Cloud Resources within Visual Studio

Today’s Windows Azure SDK 2.2 release adds support for remote debugging many types of Windows Azure resources. With live, remote debugging support from within Visual Studio, you are now able to have more visibility than ever before into how your code is operating live in Windows Azure.  Let’s walkthrough how to enable remote debugging for a Cloud Service:

Remote Debugging of Cloud Services

To enable remote debugging for your cloud service, select Debug as the Build Configuration on the Common Settings tab of your Cloud Service’s publish dialog wizard:

image

Then click the Advanced Settings tab and check the Enable Remote Debugging for all roles checkbox:

image

Once your cloud service is published and running live in the cloud, simply set a breakpoint in your local source code:

image

Then use Visual Studio’s Server Explorer to select the Cloud Service instance deployed in the cloud, and then use the Attach Debugger context menu on the role or to a specific VM instance of it:

image

Once the debugger attaches to the Cloud Service, and a breakpoint is hit, you’ll be able to use the rich debugging capabilities of Visual Studio to debug the cloud instance remotely, in real-time, and see exactly how your app is running in the cloud.

image

Today’s remote debugging support is super powerful, and makes it much easier to develop and test applications for the cloud.  Support for remote debugging Cloud Services is available as of today, and we’ll also enable support for remote debugging Web Sites shortly.

Firewall Management Support with SQL Databases

By default we enable a security firewall around SQL Databases hosted within Windows Azure.  This ensures that only your application (or IP addresses you approve) can connect to them and helps make your infrastructure secure by default.  This is great for protection at runtime, but can sometimes be a pain at development time (since by default you can’t connect/manage the database remotely within Visual Studio if the security firewall blocks your instance of VS from connecting to it).

One of the cool features we’ve added with today’s release is support that makes it easy to enable and configure the security firewall directly within Visual Studio. 

image

Now with the SDK 2.2 release, when you try and connect to a SQL Database using the Visual Studio Server Explorer, and a firewall rule prevents access to the database from your machine, you will be prompted to add a firewall rule to enable access from your local IP address:

clip_image001

You can simply click Add Firewall Rule and a new rule will be automatically added for you. In some cases, the logic to detect your local IP may not be sufficient (for example: you are behind a corporate firewall that uses a range of IP addresses) and you may need to set up a firewall rule for a range of IP addresses in order to gain access. The new Add Firewall Rule dialog also makes this easy to do. 

Once connected you’ll be able to manage your SQL Database directly within the Visual Studio Server Explorer:

image

This makes it much easier to work with databases in the cloud.

Visual Studio 2013 RTM Virtual Machine Images Available for MSDN Subscribers

Last week we released the General Availability Release of Visual Studio 2013 to the web.  This is an awesome release with a ton of new features.

With today’s Windows Azure update we now have a set of pre-configured VM images of VS 2013 available within the Windows Azure Management Portal for use by MSDN customers.  This enables you to create a VM in the cloud with VS 2013 pre-installed on it in with only a few clicks:

image

Windows Azure now provides the fastest and easiest way to get started doing development with Visual Studio 2013.

Windows Azure Management Libraries for .NET (Preview)

Having the ability to automate the creation, deployment, and tear down of resources is a key requirement for applications running in the cloud.  It also helps immensely when running dev/test scenarios and coded UI tests against pre-production environments.

Today we are releasing a preview of a new set of Windows Azure Management Libraries for .NET.  These new libraries make it easy to automate tasks using any .NET language (e.g. C#, VB, F#, etc).  Previously this automation capability was only available through the Windows Azure PowerShell Cmdlets or to developers who were willing to write their own wrappers for the Windows Azure Service Management REST API.

Modern .NET Developer Experience

We’ve worked to design easy-to-understand .NET APIs that still map well to the underlying REST endpoints, making sure to use and expose the modern .NET functionality that developers expect today:

  • Portable Class Library (PCL) support targeting applications built for any .NET Platform (no platform restriction)
  • Shipped as a set of focused NuGet packages with minimal dependencies to simplify versioning
  • Support async/await task based asynchrony (with easy sync overloads)
  • Shared infrastructure for common error handling, tracing, configuration, HTTP pipeline manipulation, etc.
  • Factored for easy testability and mocking
  • Built on top of popular libraries like HttpClient and Json.NET

Below is a list of a few of the management client classes that are shipping with today’s initial preview release:

.NET Class Name

Supports Operations for these Assets (and potentially more)

ManagementClient

Locations
Credentials
Subscriptions
Certificates

ComputeManagementClient

Hosted Services

Deployments

Virtual Machines

Virtual Machine Images & Disks

StorageManagementClient

Storage Accounts

WebSiteManagementClient

Web Sites

Web Site Publish Profiles

Usage Metrics

Repositories

VirtualNetworkManagementClient

Networks

Gateways

Automating Creating a Virtual Machine using .NET

Let’s walkthrough an example of how we can use the new Windows Azure Management Libraries for .NET to fully automate creating a Virtual Machine. I’m deliberately showing a scenario with a lot of custom options configured – including VHD image gallery enumeration, attaching data drives, network endpoints + firewall rules setup - to show off the full power and richness of what the new library provides.

We’ll begin with some code that demonstrates how to enumerate through the built-in Windows images within the standard Windows Azure VM Gallery.  We’ll search for the first VM image that has the word “Windows” in it and use that as our base image to build the VM from.  We’ll then create a cloud service container in the West US region to host it within:

image

We can then customize some options on it such as setting up a computer name, admin username/password, and hostname.  We’ll also open up a remote desktop (RDP) endpoint through its security firewall:

image

We’ll then specify the VHD host and data drives that we want to mount on the Virtual Machine, and specify the size of the VM we want to run it in:

image

Once everything has been set up the call to create the virtual machine is executed asynchronously

image

In a few minutes we’ll then have a completely deployed VM running on Windows Azure with all of the settings (hard drives, VM size, machine name, username/password, network endpoints + firewall settings) fully configured and ready for us to use:

image

Preview Availability via NuGet

The Windows Azure Management Libraries for .NET are now available via NuGet. Because they are still in preview form, you’ll need to add the –IncludePrerelease switch when you go to retrieve the packages. The Package Manager Console screen shot below demonstrates how to get the entire set of libraries to manage your Windows Azure assets:

clip_image002

You can also install them within your .NET projects by right clicking on the VS Solution Explorer and using the Manage NuGet Packages context menu command.  Make sure to select the “Include Prerelease” drop-down for them to show up, and then you can install the specific management libraries you need for your particular scenarios:

image

Open Source License

The new Windows Azure Management Libraries for .NET make it super easy to automate management operations within Windows Azure – whether they are for Virtual Machines, Cloud Services, Storage Accounts, Web Sites, and more. 

Like the rest of the Windows Azure SDK, we are releasing the source code under an open source (Apache 2) license and it is hosted at https://github.com/WindowsAzure/azure-sdk-for-net/tree/master/libraries if you wish to contribute.

PowerShell Enhancements and our New Script Center

Today, we are also shipping Windows Azure PowerShell 0.7.0 (which is a separate download). You can find the full change log here. Here are some of the improvements provided with it:

  • Windows Azure Active Directory authentication support
  • Script Center providing many sample scripts to automate common tasks on Windows Azure
  • New cmdlets for Media Services and SQL Database

Script Center

Windows Azure enables you to script and automate a lot of tasks using PowerShell.  People often ask for more pre-built samples of common scenarios so that they can use them to learn and tweak/customize. With this in mind, we are excited to introduce a new Script Center that we are launching for Windows Azure.

You can learn about how to scripting with Windows Azure with a get started article. You can then find many sample scripts across different solutions, including infrastructure, data management, web, and more:

image

All of the sample scripts are hosted on TechNet with links from the Windows Azure Script Center. Each script is complete with good code comments, detailed descriptions, and examples of usage.

Summary

Visual Studio 2013 and the Windows Azure SDK 2.2 make it easier than ever to get started developing rich cloud applications. Along with the Windows Azure Developer Center’s growing set of .NET developer resources to guide your development efforts, today’s Windows Azure SDK 2.2 release should make your development experience more enjoyable and efficient.

If you don’t already have a Windows Azure account, you can sign-up for a free trial and start using all of the above features today.  Then visit the Windows Azure Developer Center to learn more about how to build apps with it.

Hope this helps,

Scott

P.S. In addition to blogging, I am also now using Twitter for quick updates and to share links. Follow me at: twitter.com/scottgu

29 Comments

  • Really nice updates. Like the remite debugging integration. Any News on cors support for azure blobs?

  • Congrats on another round of awesome updates.

    In particular Remote Debugging Cloud Services with Visual Studio is pretty sweet.

    You guys are on fire!

  • Remote Debugging Cloud Services with Visual Studio is really good news

  • Aha, maybe this explains why my existing PowerShell scripts have issues with uploading blobs to Storage. It returned authorization header problems.
    I had this:
    Get-ChildItem -Path $localFolderRoot -Recurse -File | Set-AzureStorageBlobContent -Container $containerName -Force

    I was able to solve it by coding it in another way.
    Get-ChildItem -Path $localFolderRoot -Recurse -File | foreach {
    $relativePath = (Get-Item $_.FullName | Resolve-Path -Relative).Substring(2).Replace("\", "/") # Remove .\ and change slash direction
    Set-AzureStorageBlobContent -Container $containerName -Blob $relativePath -File $_.FullName -Force -ErrorAction Stop
    }

  • UM....Wow!

  • Leon, I am interested in the issue you hit with "\", "/", are you running your Azure powershell on .Net4.5?

  • Restricting VS Images to MSDN subscribers is a little weird. You could make it generally available to everyone and charge for actual use. This would enable a lot of indie devs to use VS Ultimate in the cloud without an MSDN subscription.

  • When I originally commented I appear to have clicked the
    -Notify me when new comments are added- checkbox and now each time a comment is added
    I recieve four emails with the exact same comment.
    There has to be a means you are able to
    remove me from that service? Thank you!

  • The is awesome - remotedebugging for .NET on Azure! Scott you got the priorities on the team right - thank you so much!

  • Having an ability to manage all the Azure assets in IDE, without leaving Visual Studio looks very cool to me. Perhaps would be also nice to have a dashboard with all the resources on one screen alone with performance counters etc.

  • Awesome updates!! love them

  • Hi Jason Tang,

    Yes I'm running .NET 4.5.1 and think the underlying issue is with the slash direction.

  • Fantastic update! I love the possibility to debug the services now directly! Thanks!

  • Are we supposed to be able to use this immediately on existing solutions? I installed SDK 2.2 on VS 2012, and now my solution originally built to SDK 2.1 won't run. Initially it did, but I got null for all requests to the CloudConfigurationManager. I read that I should manually update the Azure project, which I've done, but now it won't even start up. I just get "Role instances are taking longer than expected to start". I've had to disable caching to get it running again, but I'm still getting null for any requests to CloudConfigurationManager.

    I know this isn't the place to report problems, but my advice to anyone thinking of upgrading is to not do it unless you want to waste most of your day screaming in frustration.

  • Is the debugging support available for both 2012 and 2013?

  • Congratulations for Remote Debugging Cloud Services with Visual Studio :)

  • Now that Azure subscriptions automatically come with Azure Active Directory are there any plans to provide a facility to "merge" a "Microsoft Account (formerly Windows Live ID)" with an "Organizational Account"? I realize it is probably no small feat, but having a single identity for my MSDN Subscription and Azure Subscriptions would make life much easier.

  • Remote Debugging Cloud Services from Visual Studio is a killer feature! Great feature!

  • Hi, Steve O
    we will like to take a look at the CloudConfigurationManager return null issue, thanks.

  • Seeing deployment issue with the new SDK:

    Error message in the event viewer:
    File Server Resource Manager was unable to access the following file or volume: 'E:'. This file or volume might be locked by another application right now, or you might need to give Local System access to it.

    and a warning message:
    Windows detected your registry file is still in use by other applications or services. The file will be unloaded now. The applications or services that hold your registry file may not function properly afterwards.

    DETAIL -
    1 user registry handles leaked from \Registry\User\S-1-5-21-4032204995-1799722338-1609400222-500:
    Process 1116 (\Device\HarddiskVolume1\Windows\System32\spoolsv.exe) has opened key \REGISTRY\USER\S-1-5-21-4032204995-1799722338-1609400222-500

  • Great features in the new update especially the remote debugging. Congratulations! :)

  • I accessed the v2.2 from Visual Studio Express 2013 RC for web and I downloaded the Web Installer Platform 4.6. This has been set up to install a number of programs. I never had any problem with this before (I mean earlier versions). But in this case there were confusing messages from the program and needed frequent restarts. I think the Visual Studio version I had got changed as well (the RC is gone) and the shortcut says Express Preview for web. It's confusing to say the least.

  • @Beyers,

    >>>>> Scott, or anyone else on the Azure team, where can I log an issue on Azure emails to South African customers? The formatting of the South African Rand values in Azure emails are way off.

    Sorry about that - I just forward a mail to the team that owns this to get it fixed for the future.

    Thanks,

    Scott

  • follow up with Steve O's issue about CloudConfigurationManager getsettings return null after migrated from Azure SDK 2.1 to 2.2,
    since it is migrated manually (solution migration through VS works fine), we like to know more detail for the steps of migration, have opened an issue at https://github.com/WindowsAzure/azure-sdk-for-net/issues/286
    to track this, please report the issue with more detail there, we can help you to solve it.

  • @Hongtao, Are you trying to deploy Cloud Services or Windows Azure Website? Please let us know.

  • Please fix bug with install Ubuntu on Hyper-V: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1199345

  • “There was a failure to launch the remote debugger”
    Restarting the Visual Studio 2012 didn't fix this issue. Please help.

    Ref: http://msdn.microsoft.com/en-us/library/windowsazure/dn459835.aspx

  • @Khalib, are you using Azure Web Sites here or Cloud Services? If you could give some steps that we could follow to reproduce the issue that would be ideal.

    Thanks,
    Sayed Ibrahim Hashimi

  • "There was a failure to launch the remote debugger"

    I cannot remote debug cloud service web role using VS2012 and restarting VS doesn't help either.

    Steps to reproduce couldn't be more simple: Enable remote debugging before publishing, attach the debugger to the published instance, wait for the error dialog.

Comments have been disabled for this content.