

The dreaded "application configuration is incorrect" error - skorks
http://virtualdub.org/blog/pivot/entry.php?id=296

======
Kliment
This used to bite me all the time before I switched to using Python when
distributing Windows builds of stuff. I figured it out in an ad-hoc way, but
with this article I actually understand it.

------
InclinedPlane
Definitely one of the least helpful error messages of all time.

It's a shame that more technologies aren't moving toward a "compile and
statically link everything" model, there's a lot to be said for that model in
certain circumstances.

~~~
zmmmmm
Yeah, it is bizarre how bad Microsoft error messages can be. I can _just_
conceive designing a system that works this way, but I have absolutely no idea
how someone would design such a system and have it produce absolutely no
useful diagnostic message _anywhere_ when it goes wrong.

~~~
kabdib
My first experience with COM involved a week of staring at a dialog box saying
"Error -1" and twisting knobs in my code until the error dialog went away.

This was from a piece of COM that was entirely procedural, no UI at all. Yet
someone had had the bright idea of (a) indicating an error with a dialog box
instead of a return value, which brought the entire synchronous call to a
screeching halt, and (b) reporting an absolutely useless error value.

It would have been more useful had the COM code in question /crashed/ -- at
least I could have debugged it.

It's not just Microsoft, I've seen this "error -1" behavior in many APIs, on
many systems. I've seen code that reported /any/ error as being "out of
memory" (trying to blame it on someone else? I've never understood that one,
if it's not just being lazy).

Detailed error reporting is as much of an art as designing the working face of
an API. The problem is, if you flub it, you're trying to mollify and calm an
already irritated user. Think of errors as the first line in customer support,
and get them right.

------
cousin_it
So, why would you want to use the CRT as a DLL? The article doesn't make that
clear.

~~~
zmmmmm
It enables someone else (a system administrator, microsoft patch, etc.) to
redirect it to a new version without your intervention if a security issue is
identified in the version you have shipped with your application. It's
actually a very sophisticated system that allows any number of versions of the
same dll to be used simultaneously within the system. It is also a nightmare
for unsuspecting developers when it goes wrong.

~~~
cousin_it
I've never seen a sysadmin do that, they just nuke the offending app. So I'm
filing it as "science fiction". Don't worry, use /MT.

