At twice or more the cost. A 40D body costs around $936.00 until mid July. For a more water tight Canon with a now famous IQ, one would pay $1,800 for a body, twice as much as a 40D.
Well I don't want to burst anyone's bubbles here but the weatherproofing on the 40d is nothing short of useless. Where the d300 has several layers of rubberized strips and anti-dust coating, the d40 seems to usually only have a few strips of foam/rubber. For what I do (Once again, this argument is just based on my needs, I'm not trying to slander the 40d or anything), I would cringe at the thought of using a 40d.
Also the d300 is much more accessible for gps devices and includes waterproof flash sync/pc control ports (which the 40d does not).
So for me, these features are more then worth the price. I would hate being on assignment and having my equipment crapping out on me.. (Especially as I am still building my reputation as a photographer..)