Modified to work in IIS.