IIS not acknowledging WCF service

Ever had a problem with a IIS-hosted WCF service suddenly deciding not to work anymore, despite no apparent change has been made to your system? The culprit is probably some weird windows update, or maybe your corporation (like mine) likes to automatically distribute registry hacks that have only been tested on “clean” boxes with nothing more than Office installed, not developer boxes. Anyway, when you surf in to your service with a web browser, instead of being greeted by that nice blue/white/beige standard screen, you get your .svc file just spit back out to the browser with no interpretation at all from IIS.

There can be a dozen different reasons for this, of course, most of which can be solved by a good old fashioned

C:\WINNT\Microsoft.NET\Framework\v3.0\Windows Communication Foundation>ServiceModelReg.exe -i

to reset the IIS metabase’s scriptmappings. But sometimes that won’t do it, and one thing that’s worked for me a bunch of times, that I haven’t seen anyone else writing about, is to simply go to the Properties dialog on your service’s virtual directory, and on the ASP.NET tab switch ASP.NET version to 1.1, apply, and then switching back to 2.0. This apparently resets something useful, and your service is interpreted correctly again.

Of course, just because this works for me doesn’t mean it will work for you. Your problem may be completely different, and my solution may do nothing at all for you, and if so, don’t come complaining to me. But it’s a low-risk, fast and simple little thing that you can try if your service is acting up.

Lightroom exiting without a word on startup

I’ve been using Lightroom extensively for the last year or so, and apart from the program requiring processing power significantly beyond the state of the art to run smoothly (though not quite as slow as Apple Aperture), I’m quite smitten by it. I’ve moved my entire photo catalog from the past eight years into it.

So you can imagine my chagrin when it one day just stopped working. “Stopped working” in this case meant that the program would, after startup, simply exit once the splash screen disappeared. No error message. No nothing. I was never given the opportunity to click anything, access any menu etc.

My attempts to rectify the problem involved:

  • Swearing at the computer, accompanied by threatening gestures
  • Deleting my preferences file (apparently a go-to-solution when weird things happen in Lightroom)
  • Checking and rebuilding the catalog
  • Upgrading from 1.4.0 to 1.4.1
  • Restoring my catalog from a backup
  • Pulling my hair

none of which helped me at all. I could open other (or new) catalogs, but not my main catalog containing all my 30000+ images, even when I restored the catalog from a known good backup!

After a lot of mucking around, I noticed that Lightroom apparently exited at exactly the same moment every time, while drawing a particular image on screen. I tried removing that particular image (the raw-file) from the library, but that didn’t help at all. This was when it hit me: maybe the problem was with the cached previews? Maybe that particular preview was corrupted in some way?

Scanning and rebuilding the catalog apparently only works on the .lrcat file, not the cached previews. Since they don’t have any other significance besides performance improvements, I simply deleted the entire directory. And, lo and behold, Lightroom started right up (albeit a smidgen slower, since it had to reparse all the raw files). Problem solved. Stress-induced heart attack avoided.

So, in conclusion, one more trick to try when Lightroom is misbehaving is to simply delete your cached previews. I’m not saying it will fix your problem, but since it’s unlikely that it will have any negative impact (besides a performance hit the first time the previews are rebuilt), it can be worth a try.

WordPress 2.5.1 and Windows Live Writer

After an upgrade from WordPress 2.3.something to 2.5.1, my Windows Live Writer 2008 suddenly refused to publish any posts, just complaining about

The response to the metaWeblog.newPost method received from the weblog server was invalid:

Invalid response document returned from XmlRpc server

A (lot) of googling left me with a bunch of different solutions, ranging from .htaccess hacks, stripping whitespace from the xmlRpc.php file, disabling plugins and themes, and all types of stuff like that. None of which helped. One of the more useful tips was to find Live Writer’s log file (Help, About Windows Live Writer, Show log file), but that didn’t make it any clearer what was happening. (Apparently the XML file was missing a valid root node. Gee, thanks, now I know exactly how to fix the problem…).

Long story short, after trying to reproduce the error with some other blogs, it turned out that I had made a mistake while upgrading WordPress. I had merely overwritten the 2.3.x files on my web server with the corresponding files from 2.5.1, but to do a correct upgrade you apparently have to DELETE the wp-admin and wp-includes folders first. When I did this, Live Writer just started working again… I suppose some old deprecated file was left in the folders, raising hell with something (I’m not going to waste time debugging exactly what and why, since everything’s working now I’m content).

Since I hadn’t found this trick anywhere on the net, I’m writing it up here for all to see (provided Google indexes this blog someday).