Background
There is a related post here on the CSLA.NET Forums. The forum doesn’t allow images. The Ants Memory Profiler screen captures may be useful so they are in this post. A bunch of images would just look weird, so this post contains more detail.
While writing a replacement application for an Access DB I wrote about 10 years ago for a client, I discovered a memory leak when importing data from the access source. The application is not just a replacement but an upgrade to both the DB and the Business Logic. It’s now a ASP.NET MVC based using CSLA.NET with a SQL DB. The DB import isn’t just copying the tables over directly; the entire table structure has been changed. To limit the amount of dedicated code, the import uses the CSLA Business Objects.
During development a situation occurred where remote users of the Access application weren’t able to consistently use it, and eventually not at all. So that meant a slight refocus on the development effort to get the portion that they use up an running. Unfortunately when I tried to import the full database, the application crashed several hours into the import due to a OutOfMemoryException. This was two weeks into what I estimated to be a three week effort. The next five days were spent finding where the memory was leaking. It probably would have gone faster if I had just gotten Ants Profiler from the start, but I was convinced it had to be something I was doing in my Business Objects and thought I could use the memory profiler built into Visual Studio 2008.
More...
Today I was looking at Google's Webmaster Tools for my blog. I noticed there are 11 URLs in my site map and only 6 are indexed. I started wondering why and that led to looking at what has been indexed. So I started looking at Google's index of my site, there are 189 pages indexed. It seemed like a lot considering with this post I've made 10 posts. I started looking at the links and noticed there were some huge page numbers.
More...
The syndication handler will throw an exception if you use a positive value for the Server Time Offset setting. More...
When posting future posts using Windows Live Writer (WLW) the time was being changed from what I was expecting. My expected behavior is that specifying a date and time should be the same in both the BlogEngine.NET web interface and WLW. In other words, if I create a post to be published tomorrow at 1:15 PM in both interfaces, both posts should have the same posted date/time. This was not the case.
During testing, I found that I couldn't delete items using WLW. I would get an exception saying I'm "not authorized to delete the object." As both updates are in the same class, I decided to write them both in this post.
More...
I started trying to automate future posts by specifying a post date that was in the future. Directly posting through the BlogEngine.NET web interface works without a hitch. When using Windows Live Writer though the post is posted using the current date and time, making it immediately visible. I found the cause of this problem was in the BlogEngine.Core.API.MetaWeblog class. The particular problem is that WLW doesn't provide pubDate, instead it provides dateCreated. Here is the code that needs to be changed that can be found in the GetPost method of the MetaWeblog class.
More...
While evaluating BlogEngine.NET, I noticed the code tag was shown on the first and last line of the formatted code block. At first, I thought I was using incorrect syntax. After I checked my syntax and found this post, where you can see the open and close code tag, I realized it was an problem. So I looked around and found the cause of the problem. Here's the method that causes the problem.
More...
I wanted to use Windows Live Writer to create my posts. Before going live, I decided to test out WLW with a few posts. During the tests I noticed that code was being shown with multiple lines, but only one line number. After looking at the XML posts and code, I noticed that the source code formatter expects each line to be separated by a line feed and that WLW separates lines by a <br/> with no line feed. So my simple solution was to modify the code sections before they get formatted to insure that there is a line feed after each <br/>.
More...
In testing out BlogEngine.NET, I found an issue with the source code formatter when alternate line highlighting is enabled. When the alternate line highligting option was on, the code would show the first line in the code block with code formatting, but all subsequent lines appeared outside of the code block without code formatting. In the following original code, you see that line 41 opens a div tag for an even line, and line 37 opens a p tag for an odd line. Unfortunately, as you can see on line 54, the code closes both tags as a div. This invalid syntax is what breaks the formatting.
More...
Concurrency must be considered when writing an ASP.NET application. Why it must be considered is because page requests are handled concurrently. I have seen a lot of ASP.NET code that would run fine in a single-thread, but not in a multi-threaded application. In particular, I've seen this often with code that is accessing the application Cache. The cache is thread-safe. How you use it, however, is not always. Here's a example that represents many cases I've seen posted on the web.
More...
Next week I'm attending VSLive! 2008 in Las Vegas at the Mirage. I attended last year's conference at the Rio All Suites Hotel & Casino and thought it was excellent. I am looking forward to another excellent conference this year. I'll be attending the pre and post conference workshops as well, as I found them tremendously valuable last year. I will be taking a couple junior programmers along with me this year. In addition to my team, there will be three more from other teams within my organization attending.