DevelopMENTAL Madness

Tuesday, May 26, 2009

ASP.NET: System.BadImageFormatException

If you are running IIS 7 on Vista x64 you may get this error:

System.BadImageFormatException: Could not load file or assembly 'XXXX.XXXXX' or one of its dependencies. An attempt was made to load a program with an incorrect format.

By default IIS 7 won’t load x86 (32 bit) assemblies, make sure you set your application pool’s “Enable 32-Bit Applications” setting to “True”.

Internet Information Services (IIS) Manager > Application Pools > {Your App Pool} > Advanced Settings > Enable 32-Bit Applications

If this still doesn’t work. Try changing your build configuration platform setting for each project in your solution from “Any CPU” to “x86” and then rebuilding your solution.

Right-click Visual Studio Project File in Solution Explorer > Properties > Build > Platform

Labels: , , ,

Monday, May 25, 2009

Windows Critics: Get a life

I was working on a Windows 7 post about my installation experience and I ended up in a rant. So I decided that I should move my rant to a separate post where it belongs.

Two criticisms that I have heard leveled at Windows 7 are:

  • It’s too soon (3 years) to roll out a new OS.
  • It’s just a Vista service pack

I’d like to take a minute or two to answer those from my own perspective. First to the criticism that it’s too soon. The first time I read a post to this effect the author actually said it was too short a time frame to rewrite the OS. I really have to say this is a ridiculous assumption that operating systems by any vendor (or any software for that matter) is rewritten for every release. Rewrites are the exception to the rule when it comes to software, hardware, manufacturing…you name it.

Now, to disregard the word “rewrite” for a minute let’s look at the actual time frame. Here’s a list of the release dates for the main line of Windows Client releases:

  • Windows 1.0 - 1985
  • Windows 2.0 - 1987
  • Windows 3.0 - 1990
  • Windows 95 - 1995
  • Windows 98 - 1998
  • Windows ME - 2000
  • Windows XP – 2001
  • Windows Vista – 2006
  • Windows 7 - 2009

With the exceptions of Windows 95 (a major overhaul) and Windows Vista (a complete rewrite). All Windows releases have been within 3 years.

There’s been a lot of talk about how Windows 7 is just Vista SP 3 and I have to say there really is a lot that’s like Vista. The fact that I’ve had no unsolvable compatibility issues and the similarities in the UI support it. However, the same things could have been said about Windows 95, 98 and XP. Windows 7 has improved upon the Vista performance issues enough to run on XP hardware and netbooks. I’m not going to go into a feature list, but there is also enough new features and improvements that it justifies a new release.

I only started using Vista after SP 1, because it was a complete rewrite and I believe the initial criticisms of Vista were certainly justified. But since SP 1, Vista has been extremely stable and easy to use. My favorite example is running Vista as a standard user instead of an administrator. I don’t ever run as an administrator anymore. I started doing this in XP, but it was always a pain. Vista has made this extremely easy. When you need admin privileges in Vista you get a prompt for the admin password by the UAC. If you enter the correct password you never see the prompt again. Of course the UAC is annoying, the idea was to get users to stop running as administrators – the biggest security hole there is.

I understand if people don’t like Vista, but what annoys me the most is when it becomes illogical. That anything Microsoft creates is proclaimed junk before it’s even tried. The day is too short to go into all the complaints there are about Windows. But at the end of the day when you consider that I can run Windows on ANY hardware instead of being locked into a limited configuration or having to bend over backwards by writing my own patches to the operating system (I realize Linux has come a long way, but if we’re gonna judge based on all past performance this is a fair comparison) I think people should just get off their high horse and accept that Windows does an incredible job of meeting the needs of most users. If it doesn’t meet your needs then use something that does and get a life.

Labels: ,

Monday, January 22, 2007

Using a Vista Sidebar Gadget to Consume an Image Feed

CodeProject.com has several Windows Vista coding competitions running at the moment so I thought I'd throw my hat in and give the Gadgets competition a try. Mostly because they promised a Zune to the top 5 January articles and I didn't want to wait 3 months to win a prize. So I dug in and wrote an article on publishing photo galleries to a Vista Gadget client. The gadget actually allows the user to login to the public website and purchase photos they like.

http://www.codeproject.com/gadgets/SidebarImageFeed.asp



The process was pretty interesting, I enjoyed making the gadget and learning the technology - I don't think I'll be creating many more of these though. But it kind of wet my appetite for Vista. Maybe I'll throw my hat in for the other competition on the Vista API.

Labels: ,