In the GotMono IRC channel someone mentioned that the RSS feed in BlogX (An asp.net blogging application) doesn’t work in mono, so I set out to fix it…
I found several problems with the code, as well as several questionable coding practices.
- Concatinating a “/” and another string instead of using Path.Combine (Windows and Linux do not use the same character for directory delimination).
- Using delegates for no reason, and forgetting to assign them to anything. This was the reason RSS (and the entire webservice) didn’t work. He was using a delegate for a simple method for as best as I could tell no good reason, and had forgotten to assign it in all places. I replaced this with a method that just does what it was intented to do on it’s own and everything works.
- Using one case for a filename in the filesystem (EntryView.aspx) and another in the source (entryview.aspx), which works in Windows but not any other operating system (and just isnt good practice anyway).
- Using empty catch blocks instead of if statements
A demo of BlogX running on mono is up at the following URL:
http://extremeboredom.net/testing/blogx/
Here’s all the changes I made to this so far to get it working:
http://extremeboredom.net/Stuff/BlogX_MonoFix.patch
One Comment
Looks great, I’ll give this a go and see how it plays. I’ll get back to you with how it goes.