In Valid Logic

Endlessly expanding technology

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.

Cache!

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:

  1. Add the Community Server site to Windows Live Writer (if you haven't done already) and let it fail to detect the settings.
  2. Force your site to restart, by recycling the application pool, running iisreset, or simply touch the site's web.config.
  3. 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.
  4. In WLW, go to the View menu and select Update Weblog Style.
  5. 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.

Sunday, September 10, 2006

 
blog comments powered by Disqus