IBM Computer, Laptops and Servers

Back Homepage Content Directory Resource Guide Blog

 

Why won't my ASP pages work in IIS 6.0?

After deploying a web site to Windows Server 2003, you might find that your ASP pages aren't working. Let's examine a few possible scenarios. 
 

Server Could Not Be Found 
 
Windows Server 2003 is locked down quite heavily by default; rather than leaving the surface very wide open for administrators to find all the holes and patch them, this version of Windows makes the administrator consciously decide to open certain services (e.g. IIS). 
 
So, it might be that IIS is not even installed you can do so using the Configure Your Server Wizard (in the Administrative Tools folder), and setting up the Application Server role. 
 

404 - Page Not Found 
 
This is the most common problem with a new site under IIS 6.0. By default, IIS 6.0 is only allowed to serve static content. No ASP, no ASP.NET... so calls to ASP pages will actually trigger a 404 error. See Article #2147 for directions on enabling dynamic content. 
 
As it turns out, Microsoft published KB #315122 in March of 2004 (six months after this article was addedbut who's counting <G>). 
 

Can't use COM objects 
 
If you are trying to use CDONTS, you can't... CDONTS has been deprecated, and no longer ships in the Windows Server 2003 family (see KB #810702). Microsoft has published instructions on migrating CDONTS.dll from a Windows 2000 machine to 2003but I'm not sure if the practice meets all licensing requirements, and I doubt the configuration is supported. 
 
Even though there is a workaround, I highly recommend you change your code to use CDO.Message instead (see Article #2026), or you could use a 3rd party COM object (see Article #2119) or send mail directly from SQL Server (see Article #2403). If you are planning on using SMTP directly on the box, rather than connecting to an existing SMTP server, you need to run through the Configure Your Server Wizard and make sure you have set up the Mail Server role, and that the SMTP service is running. 
 
Security is tighter in IIS 6.0, so you might get something like this, when trying to create a custom or 3rd party COM object: 
 
Server object error 'ASP 0178 : 80070005' 
Server.CreateObject Access Error 
/<file>.asp, line <line> 
The call to Server.CreateObject failed while checking permissions. Access is denied to this object.
 
You also might see "permission denied" or "path not found" errors when trying to use FileSystemObject to work with files and folders, or generic 80004005 errors when using Microsoft Access. These fall back to standard IUSR_MachineName permissions issuesyou need to make sure the IUSR_MachineName has read/write access to the folder(s) the ASP pages are trying to access, and/or execute privileges on the DLLs they are trying to invoke. 
 
To do this (replace "<YourMachineName>" with the actual name of your machine): 
  • right-click the folder where the MDB file exists; 
  • select "Sharing and Security..."; 
  • move to the Security tab; 
  • if IUSR_<YourMachineName> is not in the list, click on "Add..." and type <YourMachineName>\IUSR_<YourMachineName> in the box that says "Enter the object names to select (examples):" and hit OK; 
  • highlight IUSR_<YourMachineName> and make sure Modify, Read and Write are all checked under Allow, and not checked under Deny; 
  • hit Apply, then OK, then test your ASP page again.
Another error you might come across: 
 
Active Server Pages error 'ASP 0134'  
Invalid ProgID attribute  
/<file>.asp, line <line> 
The object has an invalid ProgID of '<Prog.ID>'.
 
The case here is either that your custom or 3rd party COM object has not been installed, or that you are using a built-in COM object that is no longer shipped (for example, MSWC.Info no longer ships with IIS 6.0). 
 
If you are using Access and IIS seems to hang, see KB #838306. 
 
Finally, you might get errors with include files that worked fine in previous version of IIS: 
 
Active Server Pages, ASP 0131 (0x80004005) 
The Include file './../something.asp' cannot contain '..' to indicate the parent directory.
 
Parent paths are disabled by default in IIS 6.0; for more information, see Article #2412 and KB #332117. 
 

Pages won't refresh 
 
There are some new registry settings in IIS 6.0, involving Change Notification, that might need to be altered in order to ensure that IIS 6.0 always serves up the freshest copy of your ASP files. See this TechNet article for more information. 
 

Session values / cookies won't persist 
 
Many of the issues with cookies are a result of changes to IE 6 (e.g. as a result of applying Windows XP SP2 or Windows Server 2003 SP1). If you are testing your site locally, it is easy to assume that the service pack affected the server, and not the "client." 
 
Please see Article #2157 for information on resolving cookie and session issues. 
 

Can't Create Visual Studio.NET Web Applications 
 
If you are having problems creating a web application with Visual Studio.NET, see this IISFAQ article. 
 

Other Resources 
 
For general troubleshooting ideas regarding IIS 6.0, see KB #323358. 
 
For information about mappings for user permissions, see KB #812614. 
 
You can download the IIS 6.0 migration tool, for helping you migrate sites from IIS 4.0 or IIS 5.0. 
 
Microsoft is offering the IIS 6.0 Resource Kit for download: get the tools (6MB) or the chapters (24MB). 
 

If you know of further information we should include in this article, please let us know.

[ Comment, Edit or Article Submission ]

Share this:

Add To Yahoo MyWeb Add To Google Bookmarks Add To Furl Fav This With Technorati Add To Newsvine Add To Bloglines Add To Ask Add To Windows Live Add To Slashdot Stumble This Digg This Add To Del.icio.us Add To Reddit

More about:

Sep October 2008 Nov
Sun Mon Tue Wed Thu Fri Sat
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31  

IBM Computer, Laptops and Servers Blog on Technorati Related Blog of IBM Computer, Laptops and Servers on Sphere
Content Directory
Resource Guide


Zend Official Store the PHP Company

Website Links
IBM Computer, Laptops and Servers Copyright © 2008 www.ibmfans.com. All rights reserved. Site Map
Homepage | Blog | Advertise | Privacy Policy | Disclaimer | Contact Us | Links