Blog

  • Classic ASP and Server.GetLastError in IIS7

    My classic ASP error logging scripts were dead in the water when I moved them to a Windows Server 2008 with IIS 7.0.

    Some code like this is useful to record errors in a database:

    dim objErrorInfo, errorStringStr
    set objErrorInfo = Server.GetLastError
    errorStringStr = objErrorInfo.File & ", line: " & objErrorInfo.Line & ", error: " & objErrorInfo.Number & " " & objErrorInfo.Description & ", " & objErrorInfo.ASPDescription & objErrorInfo.Category
    errorStringStr = replace( errorStringStr, "'", "''" )

    Instead of using the default 500 item in the list, create a new handler for status code 500.100. Point this at your script, and you should be all set to log errors.

    Another way is to enter the Error Pages module of the website profile, and click “Edit Feature Settings” on the right hand sidebar.

    This screen will appear:

    iis7getLastError

    Configure yours in a similar fashion, and Server.GetLastError will start working in your script.

  • I made a Keyword Multiplier

    While revamping a PPC advertising account last week, I discovered the lack of a convenient keyword multiplier. I am sure there is some fancy pants way of combining keyword lists in a spreadsheet application, but I find no fun in writing macros for some piece of software.

    I installed the Google Adwords desktop editor because it has a built-in keyword multiplier. It sucks. The Goo’s multiplier only combines three lists at a time, and I wanted four. It also automatically removes keywords that have low Google search volume, so if you are using their tool for any other purpose it is rather useless.

    I made my own keyword multiplier, and you can use it, too. Please try it out, and let me know if you find it to be a useful keyword tool.

    Keyword Multiplier Features

    • Fast, easy and web-based
    • Apply PPC match types to result lists
    • No uploading your keywords to a third party

    Try it yourself!