I'm surprised to find so many traditional ASP (Classic ASP) applications and developers so far. I remember the 96 and 97 when IIS3 came out, I experienced the most original ASP program, and for it and ColdFusion compared to show the amazing programmability amazed. Using traditional ASP I've built a lot of apps that will be a shining flash in my memory:
Developers who use traditional ASP programming should be aware of several minor changes to IIS7.
ASP defaults do not install
Important to come in advance! If you migrate from XP to Vista/longhorn Server, you may get this error:
--------------------------------------------------------------------------------------------------------------- -----
HTTP Error 404.3-not Found
Description:the page you are requesting cannot is served because of the multipurpose Internet Mail Extensions (MIME) map Policy is configured on the WEB server. The page you requested has a file name extension this is isn't recognized, and is not allowed.
--------------------------------------------------------------------------------------------------------------- -----
This is the case when you do not have an ASP component installed, so go to the IIS/WWW services (WWW service)/application Development (application development)/asp where you installed IIS to install it. :)
Access and traditional ASP
Many people use Access as a database-because it's compact, replicable, and easy to handle. One of our changes in Vista IIS7 is that you do not use ASP and access by default. In this article I will describe this change in detail, but this is essentially because the application pool (application pool) defaults to using \Windows\Temp instead of the application pool identity file (identity's profile) and temp directory. And because only network services can write to the temporary directory of the Network service, and the ASP uses virtual identity (impersonated identity) to access the database, anonymous or authenticated ASP applications are aborted. If you use asp+access in IIS7, you will probably see an error message that is similar to the following prompts:
--------------------------------------------------------------------------------------------------------------- -----
Microsoft JET Database Engine error ' 80004005 '
Unspecified Error
--------------------------------------------------------------------------------------------------------------- -----
The answer is simple: Turn off LoadUserProfile, or set the access permissions for temp directory to allow write operations. This and other compatibility issues led us to consider canceling this change in the Longhorn Server/vista SP1.
However, you can now choose one of the following measures:
This appcmd command closes the loaduserprofile for the default application pool. If your program runs in a different application pool (apppool), change it accordingly:
%windir%\system32\inetsrv\appcmd set Config-section:applicationpools/[name= ' DefaultAppPool '. ProcessModel.loadUserProfile:false
This command changes the temporary directory permissions for the network service to read-writable. If you are running the program in a different capacity, you will also need to open the temporary directory permission for that identity:
Icacls%windir%\serviceprofiles\networkservice\appdata\local\temp/grant Users: (CI) (s,wd,ad,x)
Icacls%windir%\serviceprofiles\networkservice\appdata\local\temp/grant "CREATOR OWNER":(OI) (CI) (IO) (F)
Script error defaults to not displayed in browser
As part of our security policy, we have turned off the ASP's prompt to automatically display script errors in the browser. In other words, the average user will not see your statement in the end which line has gone wrong. Instead, this is the wrong hint:
--------------------------------------------------------------------------------------------------------------- -----
An error occurred on the "server" when processing the URL. Contact the system administrator
--------------------------------------------------------------------------------------------------------------- ----
It is also easy to get back to the IIS6 state by running the following command:
%windir%\system32\inetsrv\appcmd Set Config-section:asp-scripterrorsenttobrowser:true
Alternatively, you can find the following option in the window interface:
Then you can see the error message:
--------------------------------------------------------------------------------------------------------------- -----
Microsoft VBScript compilation error ' 800a03ea '
Syntax Error
/test.asp, line 4
Response.Write ("I Love classic ASP" && foo)
-------------------------------------^
--------------------------------------------------------------------------------------------------------------- -----