Windows Live Writer and detecting style when using Community Server
Some people have emailed me about having trouble with Windows Live Writer detecting the style of their CS site, some of them thinking it was because they were using my ExtendedUrlMapper. I'd run into the issue with it detecting my site's style as well, so this morning, as I was messing around with some stuff, I decided to take a look into it...
The cause is actually quite simple.
The time when you are going to have the problem mostly is when you first add the blog to WLW. This is because it will hit the front page of your blog to check for RSD support. So even if the front page data wasn't cached, it will be now. Then it will try to detect the style by making a post, refreshing the page, and then removing the post. The problem is that the old post listing will still be there. So the key is to make it so that when it gets the front page of the site, the post data should not be in the cache already. Here is what to do:
- Add the Community Server site to Windows Live Writer (if you haven't done already) and let it fail to detect the settings.
- Force your site to restart, by recycling the application pool, running iisreset, or simply touch the site's web.config.
- Hit a page on your site that is not the front page (!). This will force the application to start again, and keep WLW from eating up the delay.
- In WLW, go to the View menu and select Update Weblog Style.
Once that is done, you will be able to view your post using your blog's style! Simply select View and then Web Preview.
Hopefully with the final release they fix some of its CSS url handling. For me, none of the style images show up (such as my header) because the CSS for the image is a relative path rather than the absolute URL.