Scott Hanselman

WS-AtomicTransaction Configuration on Windows Server 2008 RC0

September 28, 2007 Comment on this post [0] Posted in Longhorn | Microsoft | Programming
Sponsored By

If you get a message like this in your Roles Summary "RollUp" after installing WCF as part of the Application Server Role in Windows Server 2008RC0:

To configure WS-Atomic Transactions, run the wsatconfig.exe utility in C:\Windows\Microsoft.Net\Framework64\v3.0\Windows Communication Foundation using the following certificate thumbprint for the SSL certificate: 53B7DAAA12C8D60FD10908328A45A707C299AAB5

It's saying to go run:

WsatConfig.exe -network:enable -endpointCert:53B7DAAA12C8D60FD10908328A45A707C299AAB5  etc...

Thanks to Jesse for his help.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

How-To: Installing Windows Virtualization Services (Hypervisor) on Windows Server 2008 RC0

September 28, 2007 Comment on this post [3] Posted in ASP.NET | Microsoft | Musings | Programming
Sponsored By

Windows Server 2008 RC0 is out and available to download, peeps. Burn it to a DVD, find a spare machine and have at it.

It was a little confusing for me to find my way around, download, get a product key, etc, so here's what worked for me.

Note that I'm not involved with that group, so this is GEEK TO GEEK. For official stuff, visit the Virtualization Team's blog. My stuff may be wrong and isn't meant to replace the docs. No warranty, your mileage may vary, no complaints taken. ;)

Download Windows Server RC0

  1. Go to the Download: Windows Server 2008 RC Site to get your Product Key.
    • You'll be sent to a Shopping Cart looking dealie, but everything is $0. Proceed to "buy" the $0 copy and make note of your Product Key. I recommend the "Enterprise" version. I got the 64-bit one.
  2. You can download the ISOs directly from the bottom of this page. You can skip entering the Product Key, but you'll need it within a month if you keep going, so regardless of what order you do things, hang on to your key. Make sure you notice if you're getting the x86 version or the 64bit version.
    • Downloading slow or unreliable? Try GetRight. Works great for slow connections, downloads in parallel and generally kicks. They don't know me, and they don't pay me, but they are awesome.
  3. Burn to a DVD. I use ImgBurn now exclusively and it's wonderful. Works on 64-bit also. More on DVD Burning in another post.

imageOne of the big cool things in WS2008R0 is Virtualization Stuff built in to the OS as a "Server Role." You can add the role to an WS2008 Installation or to a "Server Core" (read: uber-minimal) installation for maximum CPU going to the VMs.

When the product is released, you'll probably be able to go "Check for Roles" and get a list of other roles for your server to download and install. However, not in this RC0 that I can see, so it can be a little roundabout.

Initially if you click Add-Roles, there will be a bunch of Roles but not Virtualization. As an aside, I really like the whole "Roles" metaphor. It really works for me and my workflow. I want this machine to be a print server, that one a file server and virtualization server, etc.

It's cool because you say "I want this machine to host Applications" and you'll get a dialog like this. It shows a description, and "What are these features required." It really sets the bar high when it comes to integrated documentation. I think that more and more apps (certainly ones I write) will have features like these "what the heck is going on" hints at every step of the way.

image

And, since you're in a wizard, as you add Roles, you'll see the new Wizard Steps added dynamically to the list on the left. It's a great UI metaphor, IMHO.

image

Anyway, I digress...here's how to get the Virtualization Role.

Do note that the Virtualization Role is a Preview Release and a separate install (as we saw) from the RC0 of Windows Server 2008 itself.

Enabling Virtualization for Windows Server 2008 RC0

Details about the "Virtualization Role" are here. Make sure you have the prerequisites:

  • x64 base Processor with Hardware-Assisted Virtualization (VT) technology. Most newer CoreDuos and AMDs and Xeons have this.
    • For my installation, I'm using a Dell Precision Desktop Xeon 5150 with 4GBs of RAM running 64-but 2008 Enterprise.
  • DEP (Data Execution Protection) turned on by default (it is in this RC)
  • Buttloads of RAM
  • Optionally Recommended: Two network cards, one for the Virtual Machines, and one for Remote Administration.

After you've installed Windows, go to C:\windows\wsv and install the two files you'll find there.

image

Next, go to the Server Manager and Add Roles and you'll see "Windows Server Virtualization" has been added to the list. Note the pre-release warning so you're on your own, OK?

image

Some wizard steps and a reboot later, you should have Windows Server Virtualization in the Roles Tree to the left of the Server Manager. Note that there are still a few steps and you need to drill into the Tree into Virtualization Services to setup your VHDs.

GOTCHA NOTE: You might get an error saying "The virtual machine could not be started because the hypervisor is not running." That can be a little confusing, but the dialog has three things you can confirm in order to get things going.

In my case, I had forgotten that most machines ship with the VMM (Virtualization) hardware bit turned OFF by default. You'll have to go into the BIOS and turn it on. Note also that you'll often need to CUT POWER COMPLETEY after you've flipped the bit...a soft reboot doesn't always work.

So, into the BIOS, cut power, reboot, loading back up, and...

BETA GOTCHA NOTE #2: After you load up the Virtualization Services MMC Console and start up a machine you might get an error when you try to "Connect" to the machine. The machine is running, you just can't see it and the message is "Your credentials did not work: [snip]...does not allow the user of default credentials to log on to the remote computer...".

This can be fixed in one of two ways (I'm sure it's already fixed in newer builds, so for now it's just an obscure edge case for me):

1. Try running vmconnect out of c:\program files\windows virtualization as an elevated command prompt.
or
2. run "net stop vmms" then "ipconfig /release" then "net start vmms" then "ipconfig /renew" and run vmconnect. Some certificates or something aren't lining up, probably because I'm on a Workgroup, not a Domain.

That's pretty much it.

virtual - Remote Desktop (12)

A couple gotchas (this always happens to me...it's karma) but otherwise very smooth and easy. It'll be even easier when you can just pull the Virtualization Role out of the Cloud and double click. All in all, a good clean install so far. I'll start working with my VMs off this machine and report my findings back to you Dear Reader.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

Seriously, Amazon, could you ship things in larger boxes?

September 27, 2007 Comment on this post [36] Posted in Musings
Sponsored By
CIMG7466

When I was growing up we were not poor, but we weren't living in the suburbs. We did fine, the folks worked extra jobs and we had a $50 limit (total) for Christmas. That's $50 per child, total. Not a bad rule, actually. We appreciated everything we got.

My dad used to have fun with it by packing things in HUGE boxes. Like seriously huge. He'd pack an GI Joe Action Figure in a Dishwasher Appliance box that was bigger than us, then create a Russian Dolls situation with nested boxes. The house was full of boxes. I think the best one was when he put a kid's digital watch that played Space Invaders into a Refrigerator box. Wrapped in Christmas Paper and everything. Fabulous.

Now Amazon is continuing my Dad's tradition. I'd love to sign up for Amazon Prime, Amazon's pay-once, ship-all-the-time-for-free shipping program, but I won't.

Why? Guilt. Eco-guilt specifically. Over the size of the boxes that stuff comes in when you order from Amazon. The box-to-item ratio is out of control and then I'm left with the box.

I love Amazon, and I love being able to order Lido Cookies from Pepperidge Farms (they aren't carried in my town) at the same store I get DVDs, but when an HD-DVD of 300 comes in a box that my 2 year old is now building a fort out of, I think things are out of control.

What's the smallest thing in the largest box that you've received from Amazon?

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

The Weekly Source Code 6

September 26, 2007 Comment on this post [10] Posted in Source Code
Sponsored By

In my new ongoing quest to read source code to be a better developer, I now present the sixth in an infinite number of a weekly series called "The Weekly Source Code." Here's some source I'm reading this week that I enjoyed.

  • xUnit is a new Unit Testing Framework from Jim "Original NUnit Guy" Newkirk and Brad "The .NET Guy" Wilson. Posts about the "why" of it are already flying and I remain neutral, like Switzerland. Seems unnecessary to me, but whatever makes you happy. Let's see if there's anything neat in the source. You gotta give them style points for extensibility. See how they make up a new attribute "RepeatTest," give it behavior, then apply it to a test and the Test Runner just runs the test as the yield's return new TestCommands. Clean.
    public class Example
    {
        static int val;
    
        [RepeatTest(5, Timeout=500)]
        public void RepeatingTestMethod()
        {
            Thread.Sleep(100);
            Assert.Equal(2, 2);
            if (val == 0)
            {
                val++;
                Thread.Sleep(1000);
            }
        }
    }
    
    public class RepeatTestAttribute : TestAttribute
    {
        readonly int repeatCount;
    
        public RepeatTestAttribute(int repeatCount)
        {
            this.repeatCount = repeatCount;
        }
    
        public override IEnumerable<ITestCommand> CreateTestCommands(MethodInfo testMethod)
        {
            for (int index = 0; index < repeatCount; index++)
                yield return new TestCommand(testMethod);
        }
    }
  • Keith Brown's Password Manager (PWM) - I had my favorite Password Manager crash on launch for me today so I rebuilt it it locally and set the Platform to x86 and it worked. While I was in there...take a look at this bodiless "Record" constructor.
    public Record(string site, string salt, string encryptedUserId, string encryptedPassword, string encryptedNotes, string useSetWindowText, string duration, string nagSpan, string nextReminder, string lastReset, string usageCount) 
            : this(site, salt, encryptedUserId, encryptedPassword, encryptedNotes, "true" == useSetWindowText,
                   "" == duration ? 0 : Convert.ToInt32(duration),
                   "" == nagSpan  ? 0 : Convert.ToInt32(nagSpan),
                   "" == nextReminder ? DateTime.MaxValue : Convert.ToDateTime(nextReminder),
                   "" == lastReset ? DateTime.Now : Convert.ToDateTime(lastReset),
                   "" == usageCount ? 0 : Convert.ToInt32(usageCount)) {
     }
  • RhinoMocks (SVN source) - Both Matt Gilbert and Mike Minutillo pointed me (back) to RhinoMocks Mike says he likes the DisposableAction pattern Ayende is fond of.
    namespace Rhino.Commons
    {
        public class DisposableAction<T> : IDisposable
        {
            Proc<T> _action;
            T _val;
    
            public DisposableAction(Proc<T> action, T val)
            {
                if (action == null)
                    throw new ArgumentNullException("action");
                _action = action;
                _val = val;
            }
    
            public T Value { get { return _val; } }
            public void Dispose() { _action(_val); }
        }
    
        public class DisposableAction : IDisposable
        {
            Proc _action;
    
            public DisposableAction(Proc action)
            {
                if (action == null)
                    throw new ArgumentNullException("action");
                _action = action;
            }
            public void Dispose(){ _action(); }
        }
    }
  • Monorail HotSwap - While you're there, take a look at these 70 lines of code. I wonder aloud if this leaks Assemblies, but it's OK because it's primarily created as a development speed thing. Clever though. Did YOU know how easy it is to compile new code from within .NET?
    void CodeChanged(object sender, FileSystemEventArgs e)
    {
        string fileName = Path.GetFileNameWithoutExtension(e.FullPath);
        string typeName = controllersNamespace+"."+fileName;
        CompilerParameters options = CreateCompilerOptions();
    
        CSharpCodeProvider provider = new CSharpCodeProvider();
        CompilerResults compilerResults = provider
            .CompileAssemblyFromFile(options, e.FullPath);
    
        container.Kernel.RemoveComponent(typeName);
        
        if(compilerResults.Errors.HasErrors)
            return;
    
        Type type = compilerResults.CompiledAssembly.GetType(typeName);
        container.AddComponent(type.FullName, type);
    }
    

Feel free to send me links to cool source that you find hasn't been given a good read.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

Halo 3 Review

September 25, 2007 Comment on this post [18] Posted in Gaming | Reviews
Sponsored By
450halo26_342mu_gates

That's pretty cool, Bill Gates sold the first copy of Halo 3 to a 17-year-old in Bellevue at the Best Buy. Why did I think of that - standing in line for 10 hours to meet Bill. Darn. I'll need to be more creative.

Fortunately, as you know, I went to work for Microsoft for one reason. Was it to "influence millions of developers?" Please. It was to get a cheap copy of Halo 3. Home delivered. Yesterday. To my home. Thank you Company Store. I can quit now.

Seriously, the wife was kind enough to let me encourage me to play "that damn game" last night from about 10pm to 3am. I don't play a lot of games, so this was a rare thing. I started on the Solo Campaign - I never start with Multiplayer, I want to get my bearings first - I did that for about four hours. I then did the Multiplayer Matches for the last two.

Here's my impressions.

First Impressions

It looks like Halo. Maybe I've forgotten what Halo 1 and Halo 2 look like, but Halo 3 looks like those, except bigger and sharper. The graphics aren't face-meltingly awesome like BioShock or Gears of War. I didn't go "holy crap, look at that water" or utter any "wow's" that I can think of.

However, it's smooth. It's calm. The framerate is clearly the number one priority of their graphics engine. You can feel it as you walk around. There's no tearing, no drops, no slowdown. It's just buttery smooth. I'm not saying that they've sacrificed visual quality for framerate, I'm not qualified nor do I have an eye for such things. I am saying that you WILL notice the smoothness. I did like the Spartan (no pun intended) opening menu. No nonsense. Gets you right into the game.

Single Player

The story picks up literally minutes after Halo 2 ends. This of course means that you should familiarize yourself with the story if you want the cutscenes to make sense. I had to read Wikipedia on Halo 2 before I went "oh! THAT was who that dude was." Then again, I have a memory like a sieve. Frankly, now that there are THREE I want to go play Halo 1 and 2 through on Single Player again for some reason more than I want to play #3.

So far the same has been very easy on Normal mode, so I think I'm going to pump up the difficulty as soon as I can. I would probably think that "Heroic" difficult would be a good default for folks who made it through the first two games.

 The dual wielding (two guns) option, combined with the addition of a pile of new weapons makes the mind work much more than with Halos 1 and 2. You're constantly asking in the back of your mind, "is this the right combo for what might be coming." Also, you'll need to watch the reaction of the enemies, as they are distinct. I never thought I'd choose a Shotgun to go after a Brute, but frankly, not only is anything better than the standard gun, the Shotgun just works. It becomes clear which weapons work against which guys and each weapon has it's reason for being.

h3logo2The story really has you on rails. After playing BioShock, another FPS that is slightly less structured (but still on rails), I had forgotten how I didn't like games that walk you from level to level. Don't get me wrong, the level design is lovely, but there seems to be a pattern just in the first few hours of walk, walk, walk, fight, fight, go back to the main area urgently!, run run run, fight fight, new door opens up, walk walk walk. We'll see if there are surprises coming that will blow my mind like the the introduction of The Flood did.

My ONLY complaint (and it's a lame one) is that the dude is just so jumpy. After playing Gears of War and being stuck to the ground with no jumping at all, the Master Chief in Halo 3 seems like he's running on the Moon an can leap really high and really slow. It's a little confusing for me, but I'm getting used to it. Pretty lame that's my worst complaint. ;) It's a really solid game.

Oh, one other thing you can do Single Player is you can play cooperatively single player online. If anyone sees me online in Xbox Live I'm "glucose" and I'm happy to play if the family is asleep. If you haven't played a single-player game as a team with someone in another timezone, do, it's a treat.

Multi-Player

So balanced. I just hate getting beat on in Multi-player games. Seriously. It's depressing. I suck and I know it, so I want to be paired with others who suck equally. How hard is that? Well, apparently it's so hard that it takes three versions - but they nailed it. You really do get matched to folks that are challenging, but not punishingly so.

There's a ridiculous number of options and choices in multi-player and if Bungie continues to offer maps (which I'm sure they will) then it will continue to stay fresh. They've even included an object placement/map editor called the Forge. You can't change terrain, but you can move stuff around and buy and place weapons.

Last night when I was playing there were about 90,000 people online. Right now there are:

  • Halo 3 Players Online: 151,309
  • Unique Players (Last 24 Hours): 529,510
  • Matches Logged (Last 24 Hours): 1,649,790

It looks like there are at least a half-million folks for us to play with. :)

Conclusion

Is it the greatest game ever? Probably not, but I'm only 4 hours into the single player mission. It might turn out that way. It's clearly different from Bioshock (which may well be the greatest game ever) and Gears of War, but if you like the FPS (First Person Shooter) genre, then all three are distinct flavors worth tasting.

It's really fun to play, though, no question. As I see it:

  • BioShock - Prettiest Game To Date. Full Stop. Amazingly deep story that's not too hard to follow. Unbelievable sound engineering - you must play it with headphones or a nice 5.1 surround sound.
  • Gears of War - Most "immersively urgent" Game to Date. I'm literally on the edge of my seat with this game. The camera work is fantastic and the human models are the best I've seen in any game, including Halo 3
  • Halo 3 - Most Balanced Game. There's something about Halo's Multiplayer Matching. I noticed it in the Halo 3 Beta, and it's even better in the Final Release. I had the most satisfying multiplayer matches last night. I suppose it could have been a fluke, but it happened time and time again. The folks I was matched against were not kicking my ass as completely as they usually do. I attribute this to being matched to folks within my skill range. It's very nice. The whole game feels very balanced.

Should you buy Halo 3? If it make you happy, yes. It is a very pretty, very balanced game. I expect I'll have a lot of fun with it.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.