Quick to judge, Quick to anger, Slow to understand

by Ivan Hamilton 4/19/2008 4:46:00 PM

I may have jumped in a little quickly in labeling the current BlogEngine.NET release a dud. A couple of the issues (not all) I've run into are... well, not really BlogEngine.NET's fault.

There was the case of me being stupid. During serving, BlogEngine.NET remaps URLs from a friendly "slug" format to a particular page and query string (GUID of post).
For example: /post/2008/04/Quick-to-judge2c-Quick-to-anger2c-Slow-to-understand.aspx maps to /post.aspx?id=bf673029-6f24-4e31-87fd-62c53abfb857
Unfortunately, this wasn't working. An request for "/post/2008/04/..." was turning into "/post.aspx.cs/2008/04/...." which threw a 404. Huh?

Oh, I ran around in circles for a while on this one. Mono was adding ".ASPX.CS" to directories as part of URLs. WTF? After plenty of scratching and confused looks, I traced it back to Apache. Apache has a feature, MultiViews, which was enabled on my site. What's it do? It messes with your mind.... "If the server receives a request for /some/dir/foo and /some/dir/foo does not exist, then the server reads the directory looking for all files named foo.*, and effectively fakes up a type map which names all those files, assigning them the same media types and content-encodings it would have if the client had asked for one of them by name. It then chooses the best match to the client's requirements, and returns that document." In my case, "some" did not exist, and it did a match on "some.*". Turning that option off fixed the problem (I had previously worked around this in code, but could now toss out the nasty hack).

An issue with BlogEngine.NET on Mono under Linux was with its file upload capability... it was bugging out. This was caused by a Windows browser providing Windows style paths "C:\Dir\File.Ext" during HTTP file uploads. The FileUpload control under Mono extracted the file name using Path.GetFileName... which uses directory separators relevant to the system it's running on. It's not expecting to try and process a Windows path on a Linux box. I logged a bug for this, but it was already fixed in the new Mono release. I don't think I should expect a product to work around bugs in Mono when a newer release is available that addresses such issues. I was using 1.2.5, and there was recently a 1.9 release. So I upgraded.....

1.9 appeared to introduce some new bugs. One breaks HttpContext.RewritePath... which is needed by the groovy post name remapping feature! Argh! This was fixed about 10 days ago, but I'll need a bleeding edge release to get that fix.

I've tried to swap in the updated System.Web.dll from a nightly build, but it appears to depend on other changed DLLs (sigh). So, please bear with me whilst I chew on this bit of gristle. I might have to recompile my runtime from SVN. Ho hum...

P.S. It's not all bad... I have noticed at least one other thing that since the Mono upgrade have just started working!

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Related posts


Add comment



Powered by BlogEngine.NET
Original theme by Mads Kristensen

About the author

Name of author Ivan Hamilton
"My inner nerd can beat up your inner nerd."

E-mail me Send mail



<<  April 2018  >>

View posts in large calendar

Recent comments





    The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

    © Copyright 2018

    Sign in