Welcome to MSDN Blogs Sign in | Join | Help
Couple neat Windows Azure Storage related announcements

In case you missed this on the Windows Azure blog, there were a couple of neat announcements around new storage features:

Content Delivery Network: http://blogs.msdn.com/windowsazure/archive/2009/11/05/introducing-the-windows-azure-content-delivery-network.aspx

Windows Azure CDN has 18 locations globally (United States, Europe, Asia, Australia and South America) and continues to expand. Windows Azure CDN caches your Windows Azure blobs at strategically placed locations to provide maximum bandwidth for delivering your content to users. You can enable CDN delivery for any storage account via the Windows Azure Developer Portal. The CDN provides edge delivery only to blobs that are in public blob containers, which are available for anonymous access.

The benefit of using a CDN is better performance and user experience for users who are farther from the source of the content stored in the Windows Azure Blob service. In addition, Windows Azure CDN provides worldwide high-bandwidth access to serve content for popular events.

Custom Storage Domain Names: http://blogs.msdn.com/windowsazure/archive/2009/11/05/accessing-windows-azure-blobs-using-custom-storage-domain-names.aspx

The custom storage domain name feature allows you to register a custom domain name for a given storage account for anonymous blob access using that domain name. Currently we provide access to blob storage using the following domain name:

http://<account>.blob.core.windows.net/<container>/<blobname>

But if I owned a domain called “toddlers.wingtiptoys.com”, I may instead want my blobs accessible via:

http://toddlers.wingtiptoys.com/<container>/<blobname>

I'm really excited about both features as they are just so important in terms of allowing our customers to build profession and high performance web sites. 

In the case of CDN, it allows you to leverage Microsoft's content delivery capabilities for your own web sites - how cool is that?

Setting Up SQL Server Management Studio with SQL Server Express 2008 Installed

One of the things I’ve been playing with lately is SQL Azure.  I’ll post about my experience using Windows Azure and SQL Azure together shortly, this post is all about setting up SQL Server Management Studio (SSMS) with SQL Server Express 2008.

In order to use SSMS with SQL Azure, you need to have the 2008 version of SSMS installed.  I had the 2005 version and it failed to connect.

The reason I’m posting about this is that I ran into a few non obvious things.  Now the thing is, I’m not that savvy with SQL Server and I’m sure that contributed to my confusion.  On the other hand, I figure other folks may be in my situation and could find this to be useful – if I can save a couple of people’s time, then I’m happy :)

From what I understand, because there are so many different SQL Server installs and because how you install SQL Server can also impact how you can add or even if you need to add SSMS, this set of instructions is far from complete. 

If my scenario below is different for you, I found a lot of good information in the comments of this article.  You just have to sort through them and figure out what all the options/dialogs everyone is talking about.

Back to my scenario -- I specifically had SQL Server Express installed through my Visual Studio installation and I wanted to add SSMS.

There are two ways I can get SSMS for SQL Server Express 2008, one is with a download  of SQL Server 2008 Express that includes SSMS, the other is through the standalone installer.

Because i already had SQL Server Express 2008 installed, I downloaded and ran the standalone installer.  Upon running, I received this dialog:

image

Which scared me into thinking that I didn’t have SP1 of SQL Server installed.  Turned out I had so I could safely ignore this dialog.  Key point here is not to let this dialog mislead you.

Upon hitting “Run”, I was brought to the SQL Server Installation Center:

image

Again I’ll remind you that I’m not much of a SQL Server guy, so I really had no idea what to do next.  I expected to just click next through a bunch of installer screens then go to my start menu and find SSMS – so what is this I see?

After some experimentation and trial and error (too much trial and error in fact), I found I needed to click the “Installation” link on the left then click the “New SQL Server stand-alone installation or add features to an existing installation” link.

image

Great, after hitting next through some setup files, a rule check and a EULA, I was brought to the following dialog:

image

Here I initially chose to “add features” – seems like that would make sense but it turned out to be a dead end. 

I went back to “Perform a new installation of SQL Server 2008” and that led me to the next screen which allowed me to select “Management Tools – Basic”.  This is the one you want to select. (it’s already selected in the screen shot below because SSMS was installed at the time of this screen shot).

image

After clicking through the remaining dialog, I was happy to see SSMS under my start menu, Microsoft SQL Server 2008 folder.

image

Now I can connect to SQL Azure through the Query editor (not the connect dialog that comes up when you start SSMS or from the object explorer).  Only a connection from the Query Editor is supported. (a later version of SSMS, for SQL Server 2008 R2 is coming that will support SQL Azure)

image 

More to come on my SQL Azure + Windows Azure experience soon.

Hope this was helpful for someone.

Changing the Windows Azure Service Configuration when running on the DevFabric

Here’s a fun little thing I found out about recently.  Suppose, I have a Cloud Service that I’m running on the devfabric and I want to simulate a configuration change.

I’ll start by creating a cloud service with a single web role:

image

Opening the service configuration file, I can see that the instance count is set to 1.

<Role name="WebRole1">
    <Instances count="1" />
</Role>

I hit F5 and my service has 1 instance of the web role running on the devfabric:

image 

Note that the deployment ID is 51 – it’s in brackets in deployment(51).

To change the configuration while my apps is running, I open up the Windows Azure SDK command prompt (found in the start menu) and navigate to where I created my cloud service.  An easy way to get there is to right click on the Cloud Service node in Solution Explorer and select “Open Folder in Windows Explorer”.

image

In that directory will be a ServiceConfiguration.cscfg file.  This corresponds to the file in your cloud service project. Edit the value of your ServiceConfiguration.cscfg file (the one you edited before) and change the instance count to 3.

  <Role name="WebRole1">
    <Instances count="3" />

Now use the command line tools csrun to update the service configuration file.  The command line help shows the command is:

/update:<deployment-id>;<configuration-file> [/launchBrowser]

You’ll remember above that in my case the deployment ID was 51.  So my command will be:

> csrun /update:51;ServiceConfiguration.cscfg

csrun will then tell me that the new settings have been updated and when I look at the devfabric UI again, I hit refresh and I see that there are now 3 instances of the Web Role.

There are a couple of tricks here – because we are debugging this service, we started the role instances as suspended.  Click on the Service Deployment, in my case deployment(51) and hit the play button to get those instances to run.

image

What you’ll also notice now is that if you hit “break all” in VS to stop in the debugger, VS is still only debugging one instance of RdRoleHost.exe which is the host process for the web role.

image

To debug the new web role instances while not stopping this session, go to the VS Debug menu and select “Attach to Process” and select the RdRoleHost.exe processes that are not currently being debugged and click “Attach”.

image 

Hit “run” and now you’re debugging all of the role instances after making the configuration change.

image

Alright, I admit – a bit of a party trick to impress your friends with (now I have you guessing what kind of parties I go to) and not terribly useful in the July CTP as the role instances restart when the service configuration file changes.  You may also see some cases where the dfagent crashes (these are not the droids you are looking for).

Letting the cat out of the bag here – in the upcoming release, you will have more control over what happens with your roles after a configuration change and it may be interesting to debug this scenario.

Windows Azure Service Management PowerShell cmdlets

In case you didn't see this on Ryan Dunn's blog, we just released some neat Powershell cmdlets that wrap the Service Management API and allow you to script your deployments, upgrades and most of what you can do today in the Developer Portal.

They are available here:http://code.msdn.microsoft.com/azurecmdlets

The csmanage tool that utilizes the Service Management API may also be of interest to you: http://code.msdn.microsoft.com/windowsazuresamples

I generally don’t like to just make announcements like this on my blog but since it is very Windows Azure developer tool related, I wanted to include it.

Windows Azure Tools for Microsoft Visual Studio 2010 Beta 2 Coming Soon

Recently, I updated a somewhat out of context (for this blog) post titled "Windows Azure Tools and Visual Studio 2010”. 

One of the things you’ll notice is that we let the cat out of the bag that we’ll be releasing something new and big in November!  (ok, maybe not a big surprise given that PDC 2009 is in November as well) 

It’s one of the reasons my blog has been quieter than usual over the last months, there’s a lot of stuff coming and I’ll have a lot of posts in November and December.

That said, the main reason for the post is to provide a landing page for a link we have from Visual Studio 2010.  In fact, we have a lot of cool Visual Studio 2010 integration features to talk about.

Let me elaborate.

When you first start up Visual Studio 2010 beta 2, you’ll see in the “Getting Started” tab that there is a section for “Cloud”.  Here you can get directed to a lot relevant content for developing for Windows Azure, notably a number of links to the newly redesigned azure.com.

image

When you click on File –> New Project, you’ll also see that by default (no tools installed), we have a node under Visual Basic and Visual C# entitled “Cloud Service”.

When you select that node, you’ll see the following – a project template called “Enable Windows Azure Tools”

image 

When you create that project VS will open up a page with the following:

image

Here, you can click on “Download Windows Azure Tools” to get the latest tools for Visual Studio. 

Today – it will take you to the page I mentioned above – we’re getting our exciting upcoming release ready for you! 

From my previous post:

We’re really excited about this release as not only does it support Visual Studio 2010 Beta 2, but it also adds a new UI over the service definition and configuration files, adds new template options for creating roles, improves debugging integration with the development fabric and integrates with a number of new platform features and improvements.

Stay tuned!

Windows Azure Tools and Visual Studio 2010

Windows Azure Tools for Visual Studio

 

Windows Azure Tools for Microsoft Visual Studio extend Visual Studio to enable the creation, building, configuring, debugging, running and packaging of scalable web applications and services on Windows Azure.

 

Windows Azure Tools for Visual Studio 2010 Beta 2 – Coming Soon!

 

We’re putting the final touches on our upcoming November release of the Windows Azure Tools, SDK and cloud which will support Visual Studio 2010 Beta 2. 

 

We’re really excited about this release as not only does it support Visual Studio 2010 Beta 2, but it also adds a new UI over the service definition and configuration files, adds new template options for creating roles, improves debugging integration with the development fabric and integrates with a number of new platform features and improvements.

 

Please check back regularly for availability. In the meantime, if you have Visual Studio 2008, you can use the Microsoft Web Platform Installer 2.0 to get the Windows Azure Tools for Microsoft Visual Studio 2008.

You can also learn more about Windows Azure at http://azure.com.

Installing the Windows Azure Tools using the Web Platform Installer

Today, the IIS team released a the Web Platform Installer 2.0 RTW.  Among the many cool new things (more tools, new applications, and localization to 9 languages) is the inclusion of the Windows Azure Tools for Microsoft Visual Studio 2008.

Install the Windows Azure Tools for Microsoft Visual Studio 2008 using the Web Platform Installer.

image

Why should you care?  As many of you know, before using the Windows Azure Tools, you need install and configure IIS which requires figuring out how to do that and following multiple steps.  The Web Platform Installer (we call it the WebPI) makes installing the Tools, SDK and IIS as simple as clicking a few buttons.

For example, on a fresh machine, when I use the WebPI to install the Tools – look at all of the dependencies that get brought in and installed for me.  I also don’t need to know to install IIS as a separate step, *it just works*.

clip_image002

One thing I do want to point out is that if you to browse around the WebPI to find the Windows Azure Tools, you first have to go to the Options dialog:

image

And select the “Developer Tools” checkbox.

image

A couple of other notes:

  • The Microsoft Web Platform home page is on microsoft.com/web
  • If you have trouble with the link to install the Windows Azure Tools, try installing the WebPI manually first, then clicking on the link.
  • The applications installed by the Web Platform Installer are intended to be run on IIS, not Windows Azure.  We’re working on resolving this moving forward.
Using WCF on Windows Azure

Today, the WCF team released a patch that will help you if your are using WCF on Windows Azure

Essentially, if you use the "Add Service Reference..." feature in Visual Studio or svutil to generate WSDL for a service that is hosted on Windows Azure either locally or in the cloud, the WSDL would contain incorrect URIs. 

The problem has to do with the fact that in a load balanced scenario like Windows Azure, there are ports that are used internally (behind the load balancer) and ports that are used externally (i.e. internet facing).  The internal ports were showing up in the URIs.

Also note that this patch is not yet in the cloud, but will be soon. i.e. it will only help you in the Development Fabric scenario for now. (Will post when the patch is available in the cloud.)

While we're on the topic of patches, please see the list of patches related to Windows Azure.

Using app.config in the July 2009 CTP

In the July 2009 CTP of the Windows Azure Tools for Microsoft Visual Studio, we introduced a bug where if you use the App.Config file in a Worker Role, it won’t get included in your Service Package both when running on the local Development Fabric or in the Cloud.

To resolve this issue, simply add the following environment variable before starting Visual Studio:

AddAppConfigToBuildOutputs=true

This will be fixed in our next release, in fact it’s fixed in our daily builds already.

What happened?

In order to support TFS Build, we changed how files are copied to the package for the Worker Role.  As part of the changes, we missed calling one of the targets with a property set to handle the App Config.

It was lucky for us that our customers can workaround the issue by setting the environment variable above and MSBuild will do the right thing.

Scenario

To elaborate on the scenario, if you create a new Cloud Service with a Worker role by clicking File | New Project | Visual C# | Cloud Service and adding a Worker Role:

image

Right Click on the WorkerRole1 project in Solution Explorer and select Add | New Item and select the “Application Configuration File” item.

image

Build the solution and navigate to the Service Package (more info on Service Packages) and you’ll find that the app.config file is missing from the worker role.  (no WorkerRole1.dll.config)

This is true in the packaging for the Development Fabric and if you Published for the Cloud.

Exit Visual Studio and add the environment variable: AddAppConfigToBuildOutputs=true

Then restart Visual Studio and open up that same solution you were working on.

Rebuild All and again navigate to the Service Package.  This time you will see the WorkerRole1.dll.config file as you would expect.

Sorry for the inconvenience, again this is temporary and you now know the workaround.

Some forum threads about this:

Associating an ASP.NET Web Application (including MVC) as a Web Role

If you’ve been following along, you’ll remember my post about using an existing ASP.NET Web Application as a Web Role.  We’re now a little smarter in the tools and can allow you to associate any ASP.NET Web Application in the Cloud Service as a Web Role. 

For example, I can create a Cloud Service with just a Worker role, right click on the Solution in Solution Explorer and select Add | New Project and select an ASP.NET Web Application from the Web folder. 

image

This could be *any* ASP.NET Web Application, including derivatives of it like an MVC project, Dynamic Data etc.

For the sake of this demo, I’ll add an ASP.NET MVC Web Application:

image 

I then right click on the Roles node in the Cloud Service project and select Add | Web Role Project in solution…

image

Now instead of just “Web Roles”, you will get a list of all ASP.NET Web Application project types.  In this case, I select the MVC Web Application I created:

image

And there you have it, you are using a new or existing ASP.NET Web Application as a Web Role.

(Note that if you want to use the Service Hosting runtime APIs, you’ll have to add a reference to Microsoft.ServiceHosting.ServiceRuntime.dll yourself.)

image

When I hit F5, I get the behavior I expect, the MVC Application running on the Windows Azure Development Fabric.

image

One additional note: in order for the MVC assemblies to be included in your service package that you will upload to the cloud, make sure you set the copy local property to true for the MVC DLLs (More information here):

  • System.Web.Abstractions
  • System.Web.Mvc
  • System.Web.Routing

We hope this will make using different application types (like MVC, Dynamic Data and others) as well as using your existing ASP.NET applications easier.  Let me know what you think!

Working with Multiple Web and Worker Roles

After you install the July 2009 CTP and create a new project via File | New Project | Cloud Service, you now have a single template “Cloud Service” instead of the 4 you had in the past.

Clicking on that brings up our new project creation dialog. 

image

There are a couple of reasons we have this dialog:

  1. In the past, we only allowed you to have 0 or 1 Web Roles and 0 or 1 Worker roles in your Cloud Service.  Now you can have 0 to N of either type.  We want to help you create the Service Model you want to have.
  2. We want to expose multiple templates for you to use for each of the Roles.  For example, we’re working to one day have an MVC Web Role, Dynamic Data Web Role and more.  We not only want you to create the Service Model you want to have but also using a selection of different templates for each Role.

You can add Web and Worker Roles to the Cloud Service solution, rename the projects and hit OK to create the Cloud Service.  Try adding 2 Web Roles and 2 Worker Roles.

image

You’ll have a solution that matches:

image

Note that you’ll want to setup the port numbers for your input endpoints in the ServiceDefinition.csdef. 

We auto-generate what we hope to be safe numbers but don’t know what your intention is for each of the Web Roles – at this point in time, a second or third Web Role cannot be assigned to a sub domain, they can only be differentiated by port.

When you hit F5, we’ll bring up a web browser instance for each of the Web Roles. 

If you don’t want us to bring up a Web Browser instance for a given web role, right click on the associated Role under the Roles node and deselect “Launch Browser”.

image

Also note that when you close one web browser, your debugging session will end.

Windows Azure Tools and SDK July 2009 CTP

I’m pleased to announce that we have released a new version of the Windows Azure Tools and SDK! (will take time to propogate, try the direct link to the download)

What’s New for the July 2009 CTP?

  • Support for developing and deploying services containing multiple web and worker roles. A service may contain zero or more web roles and zero or more worker roles with a minimum of one role of either type.
  • New project creation dialog that supports creating Cloud Services with multiple web and worker roles.
  • Ability to associate any ASP.NET Web Application project in a Cloud Service solution as a Web Role
  • Support for building Cloud Services from TFS Build
  • Enhanced robustness and stability

“Enhanced robustness and stability” means that we fixed some issues we’ve heard from customer feedback:

  • Invalid URI error message when trying to create Cloud Services
  • Role instances did not start with in the time allowed error message when debugging
    • Note: This can also occur when there is a problem with the security policy – please let us know if you continue to see this problem
  • Improved the error message when you run the Development Storage the first time without SQL Server Express installed which is the default DB instance to use.

For more information on using the new features, please see the following posts:

Working with Multiple Web and Worker Roles

Associating an ASP.NET Web Application (including MVC) as a Web Role  

The Windows Azure CGI Web Role Template Explained

Many of you may not even know this, but as part of the Windows Azure Tools for Microsoft Visual Studio, we ship a Role template called “CGI Web Role”.

Today, it’s a little hard to find (yes, I’m foreshadowing that this is about to change!) as you have to create a Cloud Service project first, then add/replace the Web Role with a CGI Web Role.

For example you could create a Blank Cloud Service project:

image

In Solution Explorer, right click on the Roles node in the Cloud Service project Add | New Web Role Project…

image 

Select CGI Web Role:

image

Which adds an ASP.NET Web Application project tailored to be the configuration and files conduit for a FastCGI Application to your Cloud Service:

image

What is the purpose of the CGI Web Role? 

Even though Visual Studio doesn’t support languages like PHP, there are reasons for you to be interested in using Visual Studio when building a FastCGI application that runs on Windows Azure:

  • Configuration:
    • Includes the Web.roleconfig file which is used to specify the FastCGI application
    • Has a commented section in the web.config that describes how to add the FastCGI handler.
  • Running on the DevFabric
    • Once you have the project setup, you can hit F5 and have your application run on the DevFabric. Stop, edit and run it again with ease.
  • Packaging for deployment
    • Right click on the Cloud Service project in the Solution Explorer and select “Publish” – this will package your application for deployment.

Not to mention that Visual Studio really has a first class source editor and a lot of other features you’ll be able to make use of.

(Please see the Windows Azure SDK documentation and the FastCGI sample for more information on hosting a FastCGI application on Windows Azure.)

Not too late to vote for your favorite new CloudApp()

[Update, voting for US entries has now concluded - opening for the international winner will open soon]

Go to http://www.newcloudapp.com/vote.html to browse the apps and vote for a winner of the Azure Services Platform Developer Challenge. Voting ends June 29th for the US winner. (voting will open July 10th (submission deadline of July 9) for the international winner).

Lots of cool apps there, definitely worth a look -- all running on Windows Azure.

May CTP of the Windows Azure Tools and SDK - Now Supports Visual Studio 2010 Beta 1

Windows Azure Tools for Microsoft Visual Studio (includes SDK).  If the release is still propagating, try the Direct Link

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

Release notes/Known issues are available here

Visual Studio 2010 Beta 1 Support:

You can now use Visual Studio 2010 Beta 1 to build your Cloud Services.  There are a couple of interesting things to note however:

  • The Windows Azure Cloud does not yet support .Net Framework 4.0 – the tools will always create Web and Worker roles that target .Net Framework 3.5. They tools will complain if you try to build a Role project that targets .Net Framework 4.0
  • Visual Studio 2010 compatible samples are available here

image

 

Editing Role Properties

You can now use the Visual Studio Properties Window to edit some of the Role Properties like Enabling Full Trust and setting the instance count.

image

Feedback

As always – we love getting your feedback, you can email me off this blog, visit our Forum or enter a bug.

More Posts Next page »
Page view tracker