in reply to 500 Internal Server Error defies debugging
Having done more VB than Perl, and having created several ISAPI dlls that work just fine most of the time, I know that the 500 error is sometimes just IIS puking of its own accord and not a problem with your code, for what its worth.