IIS

Illustration

If you deploy web application or service and you get “Could not load file or assembly ‘SomeAssembly’ or one of its dependencies. An attempt was made to load a program with an incorrect format.”, chances are that you are running of 64-bit Windows.

Underlying problem is BadImageFormatException (you can check it in stack trace) but no matter how far down stack trace you take a look, you will not be able to link it to your code. Reason for that is that your application hasn’t started running yet.

IIS

By default IIS’ processes are 64 bits (on 64-bit system). Your code is in 32-bit world. Mix those two and you won’t get far. To fix it simple recompile of application in 64-bits or as “Any CPU” will do.

However, sometimes recompile is out of question. Maybe you have some 32-bit dependencies or you don’t have access to source code to recompile it. Whatever reason is, only solution is to force IIS into 32-bit mode.

Solution

That is simply done:

C:\inetpub\AdminScripts\adsutil.vbs set W3SVC/AppPools/Enable32BitAppOnWin64 True

Microsoft (R) Windows Script Host Version 5.8
Copyright (C) Microsoft Corporation. All rights reserved.

Enable32BitAppOnWin64           : (BOOLEAN) True

This will cause all IIS processes to work in 32-bit mode and that solves our problem. Not even restart is not required.

P.S. Notice that you do need to install “IIS Management Script and Tools” for that script to be available.

Bing

There is new Microsoft’s search engine called Bing. Name itself reminds me of Alan Ford’s quote: “Hello, Bing, how’s the brother?”. While meaning of that greeting is not so nice (trafficking stolen goods), it means that I will remember it without problems.

Search interface is clean (with nice picture background) and search speed is good. However, after spending one day with it, I cannot say that I am too excited. When I look at all those things it can do, I feel cheated. All that seems really useful, but in reality almost everything is limited to North America. All I got from it is just generic search engine results.

Illustration

P.S. It even fails at recognizing that I come from Croatia. Getting results of Slovenian pages does not help me much.

*WORD

In times of 8-bit systems byte (octet) was used to denote processors data size. When 16-bit computers appeared, WORD was used for sizes same as size of processor’s data bus. At those times, one WORD was equal to two bytes.

Once 32-bit computing came around, choice needed to be made. Whether to re-use WORD (but to alter it’s 16-bit era meaning) or to make new unit. DWORD (double WORD) was born to signify this new bus width. On 64-bit computers, natural choice was QWORD (quadruple WORD).

Is OWORD (octal WORD) next?

Juni Vs By.hero

Illustration

I stumbled upon this video of Zerg vs. Zerg Starcraft match.

Until now, I though that this match-up cannot last more than ten minutes. Boy, I was wrong.