Wednesday, April 16, 2008

Silently Fail - The Death of Happiness

Sometimes programs fail to do what they should. Usually they pop up an error message. Occasionally they explode in a fireball of death. But that is not as bad as silently failing. You press the send button, it looks like it sent, but it didn't. You tell it to save your file, it looks like it's saved, but it's actually not. These silent failures are the death of happiness.

Recently I have been setting up a web server at work. I want this server to be running Asp 2.0, with .Net Framework of 3.5 because I'm crazy like that. Last week it was all set up, ready to go... It was eagerly awaiting my website to be added so that it could serve it to the masses.

Yesterday the piece of code I have been working on has reached a point where it could be tested by humans (humans being non-programmers). I uploaded it into the virtual directory, and what did I get in return? http 404. WHAT?!? 404?!? It's sitting right there! I access an image in the same folder, and it displays. Why is it refusing to display my aspx file? What is going on?

After a bit of tinkering, I told that virtual folder to run in asp 1.1, at which point it gave me errors that I would expect to see if I ran it in 1.1... I put it back to asp 2.0 and it gives me a 404. Why would that happen?

Well, after a bit of tinkering, I discovered that it was because the framework 3.5 install did not complete. I had installed it, it said success, but anything I run that requires any framework above 2.0 would not work. The install had silently failed. I spent two days hunting this problem down when I should have been doing something meaningful with my life.

But now I reinstalled 3.5, and low and behold, it is all working perfectly.

Yes, silently failing is the death of happiness.

No comments: