Friday, November 01, 2013

Showing Detailed Errors with Classic ASP

Many hosting companies had detailed errors turned off, as information in the error messages can often provide hacker with clues that allow them to hack web sites. But as developers, we all know that just because everything worked great in the development environment, doesn't mean it all works when we upload to production. And those error messages are essential when debugging Classic ASP.

So you FTP your site up, go and get the 500 Internal error, with no clue as to what it is. Here's how to get those detailed error messages back so you can debug.

Create a web.config file

In that file enter:

<?xml version="1.0" encoding="UTF-8"?>
  <configuration>
    <system.webServer>
    <httpErrors errorMode="Detailed" />
  </system.webServer>
</configuration>

Save the file and upload it to the web server. Viola! Now you can get a detailed error so you can see just where the where the error is happening and what it is.

I suggest that once you solve the issue, that you turn detailed errors back off again. Every little bit of security helps when it comes to keeping your site secure.

Tuesday, August 27, 2013

Newest Website Launched

Yeah, I just completed a new website for aficionados of tactical tomahawks, hand axes and hatchets called TomahawkDB.If you've ever considered buying a tomahawk, hand axe, or hatchet, this site will give you all the information you need to make an informed buying decision. Stats include weight, length, blade width, blade length, steel type, steel hardness, handle type and pricing. So check it out, that's an order!

Wednesday, June 05, 2013

Using SQL to Replace Smart Quotes and Other Special Characters

UPDATE [table_name] SET [column_name] = REPLACE( [column_name], '’', '''')
UPDATE [table_name] SET [column_name] = REPLACE( [column_name], '–', '--')
UPDATE [table_name] SET [column_name] = REPLACE( [column_name], '“', '"')
UPDATE [table_name] SET [column_name] = REPLACE( [column_name], '”', '"')
UPDATE [table_name] SET [column_name] = REPLACE( [column_name], '…', '...')