February 2008 - Posts
...you heard it here!
Disclaimer: This post has side effects
Voting is now open! I happen to be doing a session (alongside Robert Hogg) on a small and rarely known (but amazingly powerful) technology called Volta that's coming out of Microsoft's labs at the moment. If you want to know more about it then vote for that session and come along to DDS! :)
It's the same talk we're doing at the Irish Web Developer conference, so it's going to be rehearsed to perfection by then! :)
Mat

Part 1
Had a strange unit test a couple of weeks ago. It involved the following code snippet (simplified for the purposes of this blogpost):
1: public class Order
2: { 3: public decimal Cost;
4: public decimal Quantity;
5: public decimal GetTotal()
6: { 7: return Cost * Quantity;
8: }
9: }
10:
11: [TestMethod]
12: public void TestTotalPrice()
13: { 14: Order o = new Order();
15: o.Cost = 10;
16: o.Quantity = 5;
17: Assert.AreEqual(o.GetTotal(), 50);
18: }
The test fails under Visual Studio 2005's unit test system, saying that the values do not match. However, the value passes under Visual Studio 2008's unit test system...
Any Ideas?
Server Error in '/' Application.
is not a valid Win32 application. (Exception from HRESULT: 0x800700C1)
It seems to be a good week to get caught out with technical jiggery pokery! Earlier on in the week I was trying to get one of our ASP.NET projects to load up into IIS 7 and was greeted by the above error message. Win32 Application? It's meant to be a .NET application! It shouldn't care about what kind of processor I've got. I happen to be running 64 bit Vista (until the next re-install, when I'll be going back to 32 bit without any questions asked :P) so all of my .NET applications get JIT compiled to 64 bit. This is also true with ASP.NET applications, which meant IIS complaining about a Win32 application was probably something to do with that.
I had a look around the internet, and found that IIS can be configured to host applications as 32 bit apps rather than 64 bit. This can be found in the screenshot below.
The cause of this error in the first place though was an unmanaged DLL that our application links to. As it's a 32 bit dll, it cannot be called from 64 bit software.