Wednesday, July 01 2009 - Blog
I just spent 20 minutes trying to figure out why the network in my VMware Workstation-hosted VM was dead. The VM was using bridged networking, but was unable to reach even the host. After trying everything under the sun I finally ended up in the virtual network editor. Turns out that VMware had bridged with none other than the ‘VirtualBox Host-Only Ethernet Adapter’. D’oh!
Fortunately the fix was easy. Open up the Virtual Network Editor, either from Edit –> Virtual Network Editor… from within VMware Workstation, or directly from the Start menu. Under the Automatic Bridging tab, add the VirtualBox adapter to the list of excluded adapters.
For good measure I went in to VirtualBox to make sure that it didn’t encounter the same issue. VirtualBox seems smart enough to distinguish between the physical and virtual adapters on the system (VMware adds 2 virtual adapters), as only the physical adapters are in the list of interfaces to bridge to.
Wednesday, June 10 2009 - Blog
Virtualization is a fantastic technology – especially for developers who want/need to work on different operating systems, need multiple different environments, or otherwise don’t want to muck up their machines. Given the current state of hardware today – a quad-core machine with 8GB or RAM can be built for as little as $500 – virtual machines are able to run at near-bare-metal speeds.
One downside to virtualization is that you can rule out just about anything 3D. Vendors of desktop virtualization software have been slowly trickling support for 3D into their products, but as far as I know these implementations are limited in their capabilities, and none of the vendors – not even the reigning champ VMware Workstation – supports Vista’s Aero desktop.
Enter Windows Virtual PC
After a long hiatus, we’ve finally been clued in to what the Virtual PC team has been up to. For Windows 7 Virtual PC has been resurrected as Windows Virtual PC. Unlike previous versions of Virtual PC (the last being 2007 SP1, last updated in May of 2008) this new incarnation has been integrated with the operating system and provides some very neat integration features.
Out of morbid curiosity I installed the RC of Windows 7 x86 in Virtual PC. Once the installation completed I was greeted with what is commonplace in virtual machines, no Aero.
As always, the first thing I do with a fresh virtual machine is to install the integration components and reboot. After the reboot everything looked the same – no surprise. But low and behold if you select Tools >> Enable Integration Features you are greeted with glorious eye-candy!

So Close…So Very Close
Having discovered this incredibly under-reported capability of Virtual PC, my next thought was to see if Aero would be enabled when launching an application in the guest from the host’s start menu (i.e. Windows XP Mode).
Nope…doesn’t work. Not sure if this is a bug or on purpose at this point – since the integration components in the guest provide the Aero capability as well as the ability to publish applications to the host, it seems logical that the components would enable Aero in host-launched applications.
More To Come
There’s some really neat stuff in the new Windows Virtual PC. It’s quite a shift from previous versions, and still has some significant limitations compared to the competition, but the improvements are very, very welcome! I’ll be working on a more complete post about using Windows Virtual PC, but in the mean time if you are on Windows 7 RC, go download it!
Wednesday, March 11 2009 - Blog
Over on the SDS team blog, they’ve just dropped a bombshell – v1 of SDS will essentially be a fully relational database in the cloud!
…given the feature set we are planning to support in SDS v1, a majority of database applications will “just work”, allowing developers to target on and off-premises deployments with essentially the same code base.
Why is this such a big deal?
This change to SDS removes what I consider to be the largest barrier to entry – data persistence. Assuming that you’ve got an existing application that uses a traditional database, it would take a significant effort to refactor it to use either the Azure table storage or SDS. That is also assuming that the limited query capabilities of one of the storage services met your needs. Once the announced changes are posted, it becomes much more feasible to run an existing application in the cloud.
The ambiguity between SDS and the Azure table storage has also been resolved. As those two systems exist today, it is difficult to explain the difference. The best explanation I’ve come up with is that while you can create ‘relationships’ using either service, SDS allows you to query against those relationships without having to fetch part of the relationship first. Now the difference is clear – SDS is a relational database, Azure table storage is highly scalable entity storage.
A word of caution.
While this does considerably lower the barrier to entry, it is critical to remember that simply hosting your application in the cloud does not mean it will scale! A poorly designed database will still perform poorly in the cloud as it will in your own data centers. It is the developers’ responsibility to make sure that it can handle the expected loads. SDS can now provide a highly available, highly accessible, redundant database, which is both extremely difficult and expensive to do on your own – it is not a magic bullet!
The Azure Services Platform is an amazing set of services, but my feelings are that the concepts and patterns it encourages are its most significant attribute because they promote scalable designs. It is critical to remember that at scale, things behave very, very different. I’ve personally experienced this on two projects, and in both cases the scale we were experiencing was never tested. Whether or not you deploy on Azure or in your own environment, these concepts and patterns are applicable, and can lead to more scalable designs.
Sunday, February 22 2009 - Blog
Just a heads up – I’ve changed out the main feed on the site. Instead of only blog content, the main feed includes everything.
If you haven’t yet, please update your feed reader with the new feed URL.
Friday, February 13 2009 - Blog
As promised, here is my presentation deck and demo code from last night’s user group meeting. Thank you to everyone who was able to make it!
The other note I wanted to add was the link that I was unable to remember last night in reference to denormalized data in the cloud…CAP Theorem.
Azure Presentation - [Download]
Azure Demos - [Download]
Monday, January 26 2009 - Blog
Disclaimer: This is not a tutorial on how to take an existing project and make it ‘just work’ in Azure. Depending on your existing project it may either be as easy as described below, or so painful that it’s not worth it. The goal of this post is simply to show how to make projects compatible with the Azure development fabric.
So you’ve got an existing project and are experimenting with making it run on the Azure platform. Do you…
A) Create new Azure projects and meticulously copy your code over?
B) Throw your hands up in defeat and tell your boss it’s too much work?
C) Add a few snippets of code to your existing projects and be a hero?
As it turns out, C is the correct answer! In the case of either a web application or a class library, you can easily turn them into web roles and worker roles, respectively. In order to do this, simply unload the project and add the appropriate XML to the project.
To make a web application project (including ASP.NET MVC) able to run as a web role, add the following…
<PropertyGroup>
<RoleType>Web</RoleType>
<ServiceHostingSDKInstallDir Condition=" '$(ServiceHostingSDKInstallDir)' == '' ">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\ServiceHosting\v1.0@InstallPath)</ServiceHostingSDKInstallDir>
</PropertyGroup>
To make a class library project able to run as a worker role add the following…
<PropertyGroup>
<RoleType>Worker</RoleType>
<ServiceHostingSDKInstallDir Condition=" '$(ServiceHostingSDKInstallDir)' == '' ">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\ServiceHosting\v1.0@InstallPath)</ServiceHostingSDKInstallDir>
</PropertyGroup>
Once you’ve made these changes and reloaded the project, you should be able to associate your cloud service project with an existing web or worker role!
Unload Project |
Edit Project |
Add XML |
Reload Project |
Associate Project |
A Few More Tricks
As I was working on this post I came across a few more tricks and undocumented nuances that cost me an unfortunate amount of time trying to figure out.
- In order to run an ASP.NET MVC application under Azure, you’ll need to copy the System.Web.Mvc assembly local. This can easily be accomplished from the properties pane.
- In web applications, you can not work with the RoleManager within Application_Start (see the remarks after the jump).
- While you can make any class library a worker role, the development fabric will crash & burn if you do not have exactly one class in that assembly the derives from RoleEntryPoint.
Friday, January 16 2009 - Blog
In late October, Microsoft announced their entry into the cloud computing space with Azure. Since then I’ve been playing around with it, and I tend to think that the majority of the resources have been spent on the Microsoft side of things – the documentation and client tooling are practically non-existent.
One question I continue to hear is, ‘What exactly is Azure?’. This is difficult to answer since it is actually many different components, each of which require their own description. To help shed some light on these services, Microsoft has released four white papers about the services under the ‘.NET Services’ umbrella. These are very well put together, and I think will help clarify many of the ‘what is it?’ questions.
Download the white papers here.
Monday, January 12 2009 - Blog
This weekend I wiped my system, and installed the freshly released beta of Windows 7 x64!
Why?
Why not? :) In hindsight, it may have been a bit irrational given that prior to today this system has been the most solid, stable, and enjoyable system I’ve ever worked with. I had been running Vista Ultimate x64, my very first daily-use Vista install, on fairly decent hardware for well over a year. It’s actually been so long since I’ve reinstalled the OS on my daily-use PC I completely spaced deauthorizing iTunes!
So what prompted the reinstall? After acquiring a copy of the PDC build, I installed it in VirtualBox, and the performance was unbelievable! Having experienced Vista in both the virtual and physical worlds, I’ve always felt like it depends on the Aero UI to feel snappy…it just didn’t feel quite as fast when virtualized or not using Aero. Yet this build of Windows 7 in its pre-beta state ran fast virtualized!
How’d It Go?
For the most part the experience has been pretty good. The install seemed to take an unusually long time compared to Vista…almost felt like the hardware wasn’t detected properly and hence not running at its best. This seems a bit strange since I’m running year old, fairly generic hardware. Unfortunately once I got to installing drivers, I found that the Intel chipset driver installation utility wouldn’t run due to ‘an incompatible OS’…I had to extract the zip file and manually install the drivers. Hopefully with the beta of Windows 7 publicly available Intel will update their driver package. The other hardware-related comment is that NVidia has Windows 7-specific drivers available through Windows Update.
Stability and performance have been nearly what I expected. Memory usage seems lower, and boot time seems faster. That being said, it hasn’t been a completely smooth experience.
- When the system went to sleep for the first time it didn’t want to wake back up.
- Connecting to Windows 7 via remote desktop is really, really slow and choppy, even on a fast LAN.
Software
For the most part the applications I use regularly installed and run fine. This includes Firefox 3, Foxit Reader 3, 7-Zip, BlackBerry Desktop, Launchy, Notepad++, Quicken 2009, TweetDeck, and the Windows Live applications. Both Silverlight and Flash run without any issues. For ISO mounting Virtual Clone Drive installed and works fine, and for antivirus I installed the free version of Avast! antivirus. All of my programming tools installed and run just fine – Visual Studio 2008, SQL Server Express, Tortoise SVN, ReSharper, & Visual SVN.
- iTunes: This was by far the most frustrating part of this whole experience. The installer would continually hang after installing everything else included (QuickTime, Bonjour, etc.) but before iTunes. I finally got it to work by extracting the contents of the downloaded setup file, which contains the installation packages for the individual applications, and using the iTunes installer from there.
- Google Chrome: Installed fine, but wouldn’t load any web pages. A simple Google search via Firefox brought me to a working solution. Turns out its an issue specific to the x64 version of Windows 7.
- Skype: The latest beta of Skype 4 installs and runs fine…until you try to shut it down. If you log off, restart, or shut down with Skype running, it will crash, and sometimes Windows will prompt you that it can’t restart until Skype exits. Even if you close Skype by itself it occasionally crashes.
The New Taskbar
One of the most visible changes to Windows 7 is the new taskbar. For an excellent look at the new taskbar, as well as some of its issues, I recommend taking a look at Paul Thurrott’s Simple vs. Easy article. While there are definitely some strange usability issues with the new taskbar, I think Microsoft is very, very close to something very slick. I agree with Paul that in the default mode of ‘always combine taskbar buttons’ it isn’t entirely clear what is running, and that the ‘combine when full’ is more ideal. But that still doesn’t address the launching of new instances, which leads to the jump lists. I had found the jump list on my own via the right-click, but the click, hold, & drag up technique almost feels better.
One feature that Paul didn’t address in this context is what happens when you hold over one of the running applications. After a second or two, you get a little mini-view of the window…same as Vista. But if you hold over the mini-view, all the windows on your desktop become transparent except for the one you are hovering over!

This, I believe, is the connection that has yet to be made…and Microsoft is so close! Paul points out that the taskbar was originally conceived address the problem of users ‘loosing’ open windows on the desktop – I problem that I often have as a developer who often times has many, many windows open at a time. In Vista, in addition to the taskbar and mini-views, you could also use the alt-tab, which shows only the icons and part of the window title, or the new win-tab, flip-3D eye candy, that does show the whole window, but at an angle. None of these things, however, work nearly as well as the hiding of all windows except one technique!
Think about it; they’ve got the new taskbar, and they’ve got this new hover behavior…how easy would it be to reduce the steps between mousing over the taskbar and simply hiding everything but what you are hovering over! Don’t flip it at an angle for the sake of eye candy…just show it, as is, by hiding everything else!
Final Thoughts
Overall I think this was a good thing. It gives me a chance to play with the latest and greatest, and it only cost me one authorized iTunes computer! Vista introduced the consumer to 64-bit computing, and over the last few years there have been many positive steps towards making hardware and software more compatible. Yet despite the state of Windows 7, most of the issues I encountered have been related to being an x64 OS.
That being said, I’m really excited for Windows 7. It is pretty much what Vista, an OS I very much enjoy using, that has been polished & refined. It’s already excellent performance is most certainly going to improve, applications and drivers will be updated (Intel and Apple, I’m looking at you!), and hopefully we’ll see some improvements to the taskbar, too.
Friday, January 09 2009 - Blog
Last month I presented ASP.NET MVC at the Billings .NET Users Group. While the presentation went pretty well, I am by no means a master of PowerPoint.
Ben Scheirman, on the other hand, is apparently quite good at PowerPoint. He presented the same topic at the Houston .NET Users Group last night, and his slide deck is as entertaining as it is informative. Follow the link to his post, and be sure to download the slides at the bottom of the post!
Wednesday, December 10 2008 - Blog
Here's my presentation on ASP.NET MVC from last night's user group meeting!
One of the neatest things I was able to show the group was Microsoft's Oxite project. From the site...
This is a simple blog engine written using ASP.NET MVC, and is designed with two main goals:
- To provide a sample of 'core blog functionality' in a reusable fashion. Blogs are simple and well understood by many developers, but the set of basic functions that a blog needs to implement (trackbacks, rss, comments, etc.) are fairly complex. Hopefully this code helps.
- To provide a real-world sample written using ASP.NET MVC.
We aren't a sample-building team (more on what we are in a bit). We couldn't sit down and build this code base just to give out to folks, so this code is also the foundation of a real project of ours, MIX Online. We also created this project to be the base of our own personal blogs as well so you'll probably see our blogs on the list of sites running Oxite soon.
This is a very cool example of MVC, and it's even been battle tested already running the MIX website!
Attachment: ASP.NET MVC.pptx