Monday, August 21, 2006

I came across a great web site today, www.mapmyrun.com. Using Google Maps, you can plot your run on the map and then get distance and speed calculations based on the route. The geocoding support from Google isn’t there for NZ, so you can’t search by address, but there is nothing stopping you from searching for the city and moving around manually. The bit I love best, is that you can view by satellite and also via Google Earth …

If you want to see the runs that I do most often, go here :-)

posted on 8/21/2006 9:20:59 PM (New Zealand Standard Time, UTC+12:00)  #    Comments [0]
 Wednesday, August 16, 2006

Ever wanted to know the different revenue structures used on the web? Brian Oberkirch has a great post entitled "Beyond AdSense: A Business Model Checklist". From the different options listed, it seems "Freemium" (love that term!) combined with Subscriptions is the overall favourite.
posted on 8/16/2006 9:40:01 PM (New Zealand Standard Time, UTC+12:00)  #    Comments [0]
 Friday, July 28, 2006

I always thought it was strange that the “Build Code Comments” feature was missing from VS2005. What with the alternative comment generators being unable to cope too well with .NET 2.0 code, we were left with little option. NDoc was the best of the lot, but still had a couple of problems with generics and it was difficult to find a good working version to tweak.

Good news however. The first CTP of Sandcastle (which I assume is just the codename) will be released by Microsoft later this month or early next.

It’s what they use internally for their MSDN content so it can’t be at all bad, although why couldn’t it have been released sooner with the launch of VS2005 I don’t know?

Interestingly too, Kevin Downs, the developer behind NDoc, has apparently announced that he is no longer going to be working on NDoc.

Update:
You can now download it from here.

posted on 7/28/2006 7:18:07 PM (New Zealand Standard Time, UTC+12:00)  #    Comments [0]
 Monday, July 24, 2006

It took me a while to decide on which ASP.NET hosting company to go with to host this (and future) sites. It was often difficult to make fair comparisons between company's plans being especially careful of all those hidden costs lurking in the small print! In the end, after lots of deliberation, I chose CrystalTech based in Arizona, US. CrystalTech simply provided an ASP.NET 2.0 plan and service that couldn't be matched here in NZ (a 25Mb Sql2005 database will almost double your plan cost!).

The inspiration for writing this 'recommendation' however, is that I had a problem with one of my email accounts not functioning and so I emailed support. Two minutes later I received an email response with my tracking number and a message saying that "… Our average response time for the last eight hours is 15 minutes". Sure enough, 5 minutes later I had an explanation and resolution.

Now that's service! I wouldn't have minded if it took 2, 4 or 8 hours to fix … it's the fact that I got an answer from a human being that made sense! Compare that to talking to Telecom NZ when Jetstream (broadband) goes down (which is often!), whereby after 20 minutes on hold you get some guy trying to tell you that "… maybe the wiring in your house is faulty!?!".

posted on 7/24/2006 8:19:53 PM (New Zealand Standard Time, UTC+12:00)  #    Comments [0]
 Saturday, July 22, 2006

This is something I always forget how to do. When you use the Response stream to output a file or image, you often want the name of the stream to make sense. That way, if the user tries to save the file or image, the suggested name is what you specified.

Before ending the Response stream, add something like the following:

context.Response.AddHeader("Content-Disposition", "inline;filename=" + _filename + ".png");

posted on 7/22/2006 8:16:45 PM (New Zealand Standard Time, UTC+12:00)  #    Comments [0]
 Friday, July 21, 2006

I came across the Microsoft Office Live site today, which marks Microsoft's new drive towards an ASP (Application Service Provider) model. The emphasis is on getting small business sites up and running, complete with domain name and email registration, which will be free even after the beta period. This is great news for those businesses that don't know where to start with regards to the web, especially when the domain name registered through Office Live can be transferred if/when they outgrow it!

On top of the basics there are other paid services, based on the Office suite, to aid your business to function. I was particularly keen to try the project and sales lead tools, but unfortunately for myself and other Kiwi's, it's not available this side of the world. Hopefully soon.

posted on 7/21/2006 8:13:40 PM (New Zealand Standard Time, UTC+12:00)  #    Comments [0]
 Monday, July 10, 2006

A problem I had recently was that a GridView bound to a SqlDataSource was not deleting the records when the Delete command was executed. I've tagged this entry as a "gotcha" as it isn't completely obvious where the problem might be to the uninitiated.

The Delete Sql command was executing fine, but after using SqlProfiler I noticed that the “ID” parameter was set to “Null”, hence the fact that no record was deleted. This was not what I expected as I had used the normal SqlDataSource and DataGrid wizard to set up the controls. What I was missing was setting the “DataKeyNames” property on the GridView to the name of the primary key of my data … “ID”. Now, the SqlDataSource passed through the correct Sql statement and all was good!

I’ve avoided the SqlDataSource/Designer approach whenever possible for the very reason that it’s difficult to see what’s going on when something doesn’t work. I was creating a prototype so time pressures won out and I used it!

posted on 7/10/2006 8:16:04 PM (New Zealand Standard Time, UTC+12:00)  #    Comments [1]
 Tuesday, July 04, 2006

I was shown a nice little trick today by a collegue who was trying to debug a Windows Installer CustomAction. The problem of course is that you can't debug the code because it is being launched and controlled by the Windows Installer/MSI. The trick is to add the line below somewhere in the code:

System.Diagnostics.Debugger.Break();

When this line is executed an "exception" is thrown, which launches the Visual Studio dialog asking you if you wish to debug the process as there is an exception. Now you can simply attach to your Visual Studio session and debug your code as normal! Nice trick, that after nearly 5 years of working with .NET, I had not come across.

It's worth noting that execution will continue after the Break method is called, so you need to have a normal breakpoint ready when you attach to the VS session.

posted on 7/4/2006 9:41:06 PM (New Zealand Standard Time, UTC+12:00)  #    Comments [0]