Apr 16

I ran accross the following error while fixing an old Classic ASP site:

An error occurred on the server when processing the URL. Please contact the system administrator.

Turns out this is the default error page that a visitor will see when a script error occurs. To get to the real problem, you need to tell IIS to serve up detailed ASP error messages to the client. No biggie. Here are the steps for IIS 6:

Step 1. Open IIS Manager

Step 2. Double click on the computer icon (most likely local computer)

Step 3. Open the Web Sites folder

Step 4. Right click on your site and choose ‘Properties’

Step 5. Click the Home Directory tab and click Configuration

Step 6. Under the Debugging tab, click the “Send detailed ASP error messages to client” radio button.

Step 7. Click ‘Ok’ twice.

Apr 10

I ran across a cool php script today that lets you set up a very basic image gallery. You don’t need a database, the script just reads all the images from a folder and displays their thumbnails.

Check it out here: activeGallery

Well done, ActiveUnit.

Apr 9

Ever wonder where to find the default images that Apple uses in their templates? Okay, maybe you don’t want pictures of other people’s kids, but there are other photos in there.

Here’s where to find ‘em:

  1. Right-click on Pages and select “Show Package Contents”
  2. Open Contents > Resources > Templates > Shared
  3. Look at pictures of people having fun, eating hotdogs, and making arts and crafts

67 images at your disposal – Enjoy!

Apr 4

One of my favorite tools in Visual Studio is the DataGridView control. While making an admin page for a project that I’m working on, I figured out how to use a combo box instead of the default text field. The whole process is pretty straightforward in both VS 2005 and 2008:

Step 1. After creating your DataGridView and binding it to your data source, click on the small arrow and select ‘Edit Columns…’

Step 2. Click ‘Add…’ to insert a new column into the DataGridView control. Select the column that you would like to use a combo box for, change the type to ‘DataGridViewComboBoxColumn’ and click Add when finished.

Step 3. Alright – you’ve got a combo box in your DataGridView control. Now how do we populate it with data? In your code-behind page, insert the following code in your Form_Load event:

Dim dgvc As DataGridViewComboBoxColumn
dgvc = DataGridView1.Columns("columnName")
dgvc.Items.add("Amazing Item")
dgvc.Items.add("Sweet Item")

There you have it!

Apr 3

Here’s a little guide for anyone looking to install an email certificate in Apple’s Mail client. I’ve only tried this in Leopard, but I’m assuming that the process is pretty similar in older versions.

Step 1. Get a digital email certificate. You can do this through a number of web services for free. I recommend a Thawte Email Certificate. Follow all the steps for registration and install the certificate. In the Thawte installation, Safari is not listed as one of the browsers – just choose Firefox and the certificate will be properly installed.

Step 2. Export your certificate. In Firefox, choose Preferences > Advanced > View Certificates. Highlight your new digital certificate and click ‘Backup’.

Step 3. Now that your certificate is stored locally, it’s time to import it into your Keychain. Open Applications > Utilities > Keychain Access. Make sure that ‘login’ is highlighted in the Keychains menu on the left, then select File > Import Items… and choose your certificate. To check that the certificate was installed correctly, click on ‘My Certificates’. You should see your certificate listed!

Step 4. Test drive. Go ahead and open up Mail, and compose a new message. If everything has been done correctly, you should see a small check icon right next to the signature drop down menu.

Congratulations! Your email messages are now digitally signed! Now when you exchange messages with those with signed emails, your emails will display the small lock icon, indicating that the message will be encrypted using your keys.