Last night I was trying to fix the RSS feed on my home page. I had two problems:
- The RSS feed from dasBlog had missing URL information in the <IMG> tags (read more here...)
- The RSS feed was not responding correctly after updgrading to dasBlog 1.5. I needed the SyndicationServices.asmx page to give me just the last days entries, I was getting errors.
The first problem was fixed when I discovered the RSS feed wasn't to blame. The problem with the <IMG> tags has to do with the way dasBlog 1.5 captures HTML. If you use FreeTextBox to edit your entries, it will automatically strip <IMG> tags of the absolute reference. In fact FreeTextBox does a lot of “automatic formatting” so you have to be careful when using it. The workaround is to edit entries using the normal text box, or fix entries created with FTB by editing them with the normal text box and adding the absolute references back to the <IMG> tag.
The second problem was that I was calling the wrong method of the SyndicationService web service. In dasBlog 1.4 there was a method called “GetRSSWithDayCount”. This method is replaced in 1.5 by “GetRSSWithCounts”. That's simple enough, but the problem was when I updated my web.config file to add the new RSS feed. The address is:
http://blog.markwallace.net/SyndicationService.asmx/GetRssWithCounts?maxDayCount=1&maxEntryCount=2
The problem with this address is the ampersand. When I added this entry to my web.config file (which is XML) I kept getting the following error:
This is an unexpected token. Expected 'SEMICOLON'
This is a result of the ampersand (&) between the maxDayCount and maxEntryCount variables in the query string. Since I'm a newbie to XML it took me a while to figure out what was wrong. I found a great article in Visual Studio Magazine that really helped out. Here are the five ASCII characters that are not allowed in XML files, and the escape characters to replace them:
| < |
< |
less than |
| > |
> |
greater than |
| & |
& |
ampersand |
| ' |
' |
apostrophe |
| " |
" |
quotation mark | |
I hope this helps out!