Monthly Archives: December 2006

ASP.NET error: Unrecognized configuration section 'connectionStrings'

I’ve run into this ASP.NET 1.1 error countless times and at least one of the reasons it occurs is that the IIS virtual directory is set to use the 1.1.4322 version of the .NET framework instead of 2.0. There are a few ways to correct this problem:

From the command line:



aspnet_regiis -s w3svc/1/root/<virt_dir>

Where <virt_dir> indicates the name of the virtual directory

Using the MMC snap-in for IIS:

  1. From the Start menu select Administrative Tools|Internet Information Services (refer to “Select Taskbar and Start Menu” from this post for information how to enable this menu item)
  2. Open up the treeview to the virtual directory where the error message occurs
  3. Right click the virtual directory and select properties
  4. Click the ASP.NET tab
  5. Using the drop down change ASP.NET Version to 2.0.50727

Update: Tweaked the font size of the above command-line to fix rendering in IE.

Google's Picasa could use Riya's facial recognition

I’m a big fan of Google’s photo organizer application Picasa but there is one improvement that I’d really like to see and that’s facial recognition like what Riya has. Riya is photo website that has facial recognition features that actually work incredibly well, at least for the number of pictures I uploaded. I was actually surprised at how well it did in some cases and it left me wanting this feature in Picasa. I know Picasa is free and the likelihood of this happening is probably very low but it’s that time of year and who knows I’d love to see it happen. This past year I averaged about ~360 photos a month, most of them of my two children and their mother although we’ve been to numerous one, two and three year old birthday parties and this feature could come in really handy. With all of Google’s PHD’s I’d guess at least a few of them have at least dabbled in facial recognition.

Btw, Riya it seems is chasing after the “looks like” market more than the photo market with

Are you using DUnit to test your Delphi applications?

If you’ve been reading my blog over the past few months you’ll know that I’ve written a number of posts related to automated testing. We have our own internal test automation framework so I’ve never really taken a close look at DUnit although having browsed around the SourceForge page for DUnit I’m wondering if the project is still alive/active? This post mentions an update for D2006 back in August stating that a “release version will follow in a few weeks” although the SourceForge pages for DUnit seem very quiet and the bug tracker doesn’t have any recent issues logged against the core. Not to mention that it’s obviously been more than a few weeks since August 1st, which has me wondering what the state of DUnit really is?

Our internal testing framework has a class called TTestManager, written prior to Delphi 1.0, which manages test execution and handles the “accounting” details like how many tests have executed/passed/failed. One of the design goals was to use as small a footprint of the Delphi RTL as possible to give it the best chance to compile and run in the midst of a changing compiler and RTL. Over the years TTestManager has lived up to this goal and served its purpose well though, I think it’s a bit long in the tooth and it may well be time to use something like DUnit. There are a few developers here who have experience using it and I need to sit down with them and get their opinions. One of the biggest problems we have with our tools relates to reporting and the ability to publish test results to the entire team. Again, over the years there have been a multitude of solutions though none of which have been overly effective.

So, this leaves me with the following questions:

  • Is the DUnit project still alive?
  • What is your impression of DUnit?
  • What, if any, changes they would make to it?
  • Are you comfortable writing tests with DUnit?
  • How do you publish the results of your testing efforts?

FWIW, in January I plan on spending a little time investigating DUnit to see it’s something we should look more closely at.

Blog comment attacks blocked by ASP.NET's ValidateRequest feature

For several days now the logs for my blog are showing the ASP.NET error message “A potentially dangerous Request.Form value was detected from the client” which is ASP.NET’s way of preventing potentially harmful postbacks that are coming from the comment form used here on my blog. This is probably one of those features that people love to hate but in this case I think it’s quite effective. For more information see ValidateRequest.

Delphi color conversion routines in GraphUtil.pas

I read Zarko Gajic’s and he frequently publishes interesting articles related to Delphi. He does a great job supplying the Delphi community with a constant stream of useful programming tips. His latest post Convert Delphi’s TColor to HTML Color Value has a great tip about converting color values. After reading this post it dawned on me that I’ve never mentioned the routines we’ve added to the Delphi RTL for converting colors. We also added TColor values for all of the named web colors.

You can find all of these routines in GraphUtil.pas.

{ Converts a TColor to a Web color constant like #FFFFFF }
function ColorToWebColorStr(Color: TColor): string;

{ Converts a TColor to a Web color name, returns a Web color value if the color is not a match. }
function ColorToWebColorName(Color: TColor): string;
function WebColorToRGB(WebColor: Integer): Integer;
function RGBToWebColorStr(RGB: Integer): string;
function RGBToWebColorName(RGB: Integer): string;

{ Converts a Web color name to its TColor equivalent, returns clNone if no match }
function WebColorNameToColor(WebColorName: string): TColor;

{ Converts a web style color string (#FFFFFF or FFFFFF) to a TColor }
function WebColorStrToColor(WebColor: string): TColor;

Communication inside CodeGear

For the first time in years, I’m seeing the kind of communication I believe any healthy organization requires. Ben Smith, CodeGear’s CEO mentioned back in our first meeting that he was committed to open communication and I’m seeing follow through on that statement.

One example was the marketing meeting I blogged about a few days ago. Another is when I see Ben walk by my window in one-on-one’s with employees, yes, I’ve had my one-on-one. Yet another example is the weekly all hands meeting where we’re kept informed of the latest business related news/events/hires etc. which I greatly prefer over the impersonal email bullet list we’d received in years past. Of course, there is always a Q&A session at the end of the all hands which typically yields a good question and answer or two.

All this formal stuff is great and necessary in light of conducting business although at Monday’s JBuilder ship party we got a good dose of our Exec staff’s sense of humor which I think is probably just as important, if not more so, than all this formal stuff. I’m not going to dive into the details but they were to focus of a lot of laughter.

Lastly, it can’t hurt that I now sit next door to our new VP of Sales, three office’s away from our CEO and just upstairs from our VP of Marketing. That’s in stark contrast to when Borland’s Exec staff relocated to Cupertino a few years ago. Now, the Exec staff sits next door, literally.

Tracking website usage using Google Analytics

Probably the single biggest reason I moved my blog from the Borland blog server was the lack of site statistics. I had no idea who was reading my blog, what posts were popular or how many people had subscribed to my RSS feed among many others. Moving my blog gave me much greater control over my entire blogging experience which has been very satisfying. I use Google Analytics which provides a wide array of statistics on website usage. For example here is a screenshot of the “execute overview”:

You can drill down into each of these areas as well as many others. For example, I know my top blog entries in terms of pageview are:

  1. IE7 reg file for BDS
  2. Video of code completion features
  3. DAL frameworks for .NET
  4. My Take On Borlands CodeGear Announcement

Then there are the stats from my RSS feed which I get from FeedBurner. You can follow the number of subscribers from the “chicklet” that appears in the top right hand corner of my blog. Here is a chart of the growth of my feed since I moved my blog:

FeedBurner stats

It’s really nice to be able to “see” what’s going on with my blog and having good statistics is a really good motivator.

By the way, if you think you’re having deja vue regarding this post you’re not. I accidentally posted this entry on Saturday and tried to rectify the situation before my feed was cached but apparently, at least Bloglines, has held onto the original snapshot even though I’ve pinged them numerous times to correct the error. Oh well.

Brown bag lunch with CodeGear's VP of Marketing

No, you didn’t read that wrong. CodeGear has a new VP of Marketing, Lisa Romano, in fact she’s been here a little over a month and last Thursday she held a brown bag lunch to talk to anyone interested in marketing and brand. The meeting wasn’t for her to talk but rather listen. There were about 15 engineers at the table representing QA and R&D from the Delphi/C++ and JBuilder teams.

There was some great discussion and I heard a number of good ideas not to mention I enjoyed hearing from the JBuilder guys their markent and customers. By the end, Lisa had taken several pages of notes and I think everyone walked away feeling like it was a very worthwhile meeting if not a bit shocked by the fact that we actually got to sit across the table from someone in marketing let alone a VP. There is no doubt in my mind, this was a good thing.

UPDATE: I got Lisa’s title wrong, it’s Chief Marketing Officer for CodeGear. My bad.

Delphi customers have a new website in

I’m glad to see the new CodeGear web site is up and running. Additionally, be sure to read this message from our CEO Ben Smith. It’s an exciting and challenging time and I’m really glad to see Ben mention Ruby, Python and Ajax as a few of the emerging technologies we can explore.

So, be sure to head over and check out the new site. I think it’s a good start and I’m glad we now officially have an online presence.

Do you have issues running Delphi or VCL applications on Windows Vista?

As we continue work on our next release I thought it would be worthwhile to mention that if you’re encountering issues related to running either the Delphi IDE or your VCL applications on Windows Vista that now is definitely the time to let us know. Please post any issues to QualityCentral. You’re more than welcome to leave comments here but if you want the issue fixed you definitely need to submit it to QC.

[Update: Feb 12, 2008] I’m no longer employed by CodeGear so I’d refer you to this post for how to get your Delphi questions resolved.