Installed Vista Ultimate the other day, after much customising, I finally got round to installing IIS, everything seemed to work fine, until I migrated my Classic ASP applications. Stumbled across a whole bunch of issues, which I finally resolved thanks to a bit of research on Google, so I thought I’d share some of these tips not only for others but also for myself in case I have to do it again in the future.
There are a few changes in IIS7 which Classic ASP developers should be aware of.
IUSR and IIS_IUSRS authorisation
When you first fire up your browser to your local sites/apps, you may get this error:
IIS process needs access to the physical location of the web site, in this case C:UsersHomeWebSites, however the IIS accounts in IIS7 have now changed:
- The IUSR built-in account replaces the IUSR_MachineName account
- The IIS_IUSRS built-in group replaces the IIS_WPG group
Assign these accounts to the Windows directory security with Read & Execute; List Folder Contents; Read
ASP not installed by default
If you’re moving from Windows XP to Windows Vista, you may be getting this error:
This is usually the case when you haven’t installed the ASP component. Go to control panel > Programs and Features > Turn Windows features on or off > Internet Information Services > World Wide Web Services > Application Development Features.
Script errors no longer shown in browser by default
As a result of security paranoia, Microsoft turned off ASP’s default behaviour of sending script errors (including line number and code snippet to the browser. So instead of seeing the typical error you will now see this:
An error occurred on the server when processing the URL. Please contact the system administrator
To see the full error, like it was in IIS6, change the ‘Send Errors To Browser’ setting to ‘True’. Go to IIS Manager > ASP > Debugging Properties
You should now see this style of error:
Parents paths disabled by default
This is an old issue, which hits me all the time. Parent paths by default have been disabled since IIS6 (Windows Server 2003), but in IIS5.1 (Windows XP) it was enabled. So if your coming from Windows XP to Windows Vista, this will be new, however, I keep forgetting it’s disabled in IIS6 all the time, and no exception here.
The enableParentPaths setting determines where ASP “includes” should be allowed to escape the parent directory (e.g. ../../../includeFile.inc). You’ll see this error by default if you try to escape the current directory:
or you may see this error if you are using a path with ../ in it and your ADODB code
To revert back to IIS 5.1 behavior, simply change the ‘Enable Parent Paths’ setting.
Go to IIS Manager > ASP > Behaviour