Active Server Pages (ASP) is a feature of the following Web server releases:
This document addresses the following issues pertaining to ASP:
Installation Issues
Where is the Product Documentation?
Known Issues
Maintaining Browscap.ini
Using Notepad with .Asp Files
Server-Side Includes Issues
Additional Changes to Internet Information Server and Peer Web Services
How to Obtain the North American Version of Microsoft Windows NT Service Pack 2
This section discusses issues with which you should be familiar prior to installing ASP.
You should have a minimum of 30 megabytes of free disk space in order to install ASP.
Before you install ASP on a computer running Microsoft Windows NT or Microsoft Windows 95, you must have already installed one of the following Microsoft Web servers:
Before you install ASP, be sure to stop all applications and services that might use ODBC, including Microsoft SQL Server and Microsoft Access.
If you installed Microsoft Internet Information Server as part of installing Microsoft Windows NT Server, and you made your computer a Backup Domain Controller during Windows NT setup, you will receive an error message when you install ASP. To successfully install ASP under these conditions:
ASP supports server components written in Java. To run Java server components, you must first install Microsoft VM for Java on your Web server. VM is available for download from www.microsoft.com, from the following locations:
VM is also included in Windows NT version 4.0 Service Pack 2 and later.
If you plan to use the ADO constants defined in the include files Adovbs.inc and Adojavas.inc (for VBScript and JScript, respectively), be sure to install the Adventure Works sample site. These files are located in the Aspsamp\Samples directory, which is installed in the \Inetpub directory by default.
The Active Server Pages documentation is in HTML format and is installed with the product. After you have installed Active Server Pages, you can view the documentation by choosing Active Server Pages Roadmap from your Web servers program group. From the Roadmap you can also view the Adventure Works sample Web site, which demonstrates many of the features of Active Server Pages scripting and is an excellent source of sample code. You can also view the Roadmap by typing the following address: http://yourserver/iasdocs/aspdocs/roadmap.asp.
The documentation Roadmap requires either Internet Explorer version 3.0 or later or a browser that supports frames. You will get the best results with Internet Explorer.
This section identifies issues that are not fully addressed in ASP documentation.
If you are using NTFS, and you want to prevent access to an .asp file, perform the following procedure:
Note If you select Special Access in Step 5 above, be sure that the Read permission is not enabled.
To fully secure an ASP application, be sure to set NTFS file permissions for the appropriate user or group on your applications Global.asa file. If your Global.asa includes commands that return information to the browser and you do not secure Global.asa, that information will be returned to the browser, even if the applications other files are secured.
This section discusses issues of which you should be aware when using Secure Sockets Layer (SSL) with ASP.
If you include a file that resides in an SSL-enabled virtual root from a file that resides in an unsecured virtual root, SSL is not applied to the included file. Thus, to ensure that SSL is applied, be sure that including as well as included files reside in SSL-enabled virtual roots.
If you are using SSL client authentication, you should be aware of the sequence of events involved in this process:
If you use sessions, and a virtual root name begins with and entirely contains another virtual root name, then session state may incorrectly span applications residing in these virtual roots. For example, the name /root1 begins with and contains the name /root, so using roots of these names would result in this situation. To avoid this situation, be sure that no virtual root name begins with and entirely contains another virtual root name.
If the only database you use with ASP is Microsoft SQL Serverthat is, you never use Microsoft Access (.mdb) files with ASPand you create instances of the Database Access Component that you store in the Session object, you can enhance performance by changing the threading model for Database Access Component instances from Apartment to Both in the registry. To change from Apartment to Both, double-click Makefree.bat in the \Program Files\Common Files\System\Ado folder.
To reverse this process, (that is, to change the threading model from Both to Apartment) double-click Makeapt.reg in the \Program Files\Common Files\System\Ado folder.
Note We recommend that you not store instances of the Database Access Component in the Session object. For information about recommended ways of handling Web-based database connections, see Connection Pooling in Component Reference.
This section discusses issues related to connection pooling.
Connection Pooling in Component Reference incorrectly states that connection pooling is enabled by default in ASP. Connection pooling is now disabled by default. You can enable connection pooling by setting the registry entry, StartConnectionPool, to 1. See Configuring Registry Entries in Scripting Guide for more information.
Unless you install Microsoft Windows NT Service Pack 2 (SP2) or later, using Microsoft Access with connection pooling enabled may cause system failures when shutting down IIS. Therefore, if you use Microsoft Access, and you have not installed SP2 or later, then you should not enable connection pooling.
If you have installed SP2 or later, or if the only database you use with ASP is Microsoft SQL Serverthat is, you never use Microsoft Access (.mdb) files with ASPthen enabling connection pooling will result in enhanced performance. You can enable connection pooling by setting the registry entry, StartConnectionPool, to 1. See Configuring Registry Entries in Scripting Guide for more information.
Performance Issues in Scripting Guide incorrectly states that, when storing objects in the Session and Application objects:
...unless the object you store is marked both, ASP treats the application or session containing this object as single-threaded.
This should instead read:
...unless the object you store is marked both, ASP treats the application or session containing this object as apartment-threaded.
By default, ASP checks for new virtual roots that are nested within other virtual roots on every request. This check causes performance degradation. If you are running on a stable production system (that is, you are not creating new virtual roots), then setting the Registry entry CheckForNestedVroots to 0 will improve the performance of your server. However, setting this Registry entry to 0 will also cause nested virtual roots created while the system is running to not see the Global.asa file. See Configuring Registry Entries in Scripting Guide for more information.
Under heavy load, a Web server running ASP might exhaust the virtual memory allocated to it. This allocation is based on the MemFreeFactor registry entry. MemFreeFactor is set to 50 by default.
A value of 0 causes Active Server Pages not to cache any memory; in this case, you are likely to run out of virtual memory relatively quickly. A value of 100 or greater causes ASP to cache substantially more memory. This means you are less likely to run out of virtual memory, but other applications will have less memory available to them.
If your are running a Web server dedicated to serving .Asp files, and it is exhausting virtual memory, you may want to increase the value of MemFreeFactor to 100 or greater.
If, on the other hand, serving .asp files is not placing heavy demand on your Web server and you do not want to allocate memory away from other applications, do not adjust the value of MemFreeFactor.
See Configuring Registry Entries in Scripting Guide for more information.
This section discusses issues having to do with Global.asa files.
Using the Global.asa File in Scripting Guide and Global.asa Reference indicate that a Global.asa file must reside in the root directory of an ASP-based application. This root must also be a virtual root.
Updating a file that is included by Global.asa does not restart sessions. Therefore, objects stored in the Application object are not reset. To restart sessions, save the Global.asa file.
If you have trouble registering components on Windows NT Server and Windows NT Workstation, you may be using the wrong version of Regsvr32. Please use the version installed by default in the directory C:\Winnt\System32\Inetsrv\ASP\Cmpnts.
The Response.BinaryWrite now requires a variant of type VT_ARRAY|VT_UI1 instead of a pointer to a SafeArray as a parameter. Thus, if you have existing ActiveX server components that use Response.BinaryWrite, you must recompile these components with the new header file. Refer to IResponse::BinaryWrite in Creating Components for ASP for more information.
Note Components that do not use Response.BinaryWrite are not affected by this change; you need not recompile them.
The following note, from Map Path in Object Reference, is incorrect:
Note The path parameter can contain relative paths (../../Scripts/, for example) if the EnableParentPath registry setting is set to TRUE. This is the default setting.The Server.MapPath method does not currently support the relative path syntax (.) or (..). For example, the following script command will not work:
<%= Server.MapPath("../MyDir/MyFile.txt") %>
ServerVariables in Object Reference identifies SCRIPT_MAP as a server variable you can use with the Request object to obtain the base portion of a URL. This variable is no longer supported; use the URL variable, which also returns the base portion of the URL.
Microsoft Index Server is not available for Windows 95. Thus, if you are running Windows 95 and you click the Search button from the ASP Roadmap, you will receive an error message.
Specifying an unknown scripting language as the value of the DefaultScriptLanguage registry entry may cause the following error message:
http/1.0 500 server error
If you get this error, check the DefaultScriptLanguage registry entry. Make sure that you have supplied a
valid language.
To use JavaScript in your ASP files, use JScript as the language attribute of the <SCRIPT> tag. While JavaScript is supported for backward compatibility, mixing lines of script labeled JScript with lines of script labeled JavaScript will cause errors.
The NCompass billboard control is only provided for Intel processors. This release does not include versions for the Alpha and PowerPC processors.
For performance and reliability reasons, we strongly recommend the use of Microsoft SQL Server for the deployment of production-quality Web applications. Although Active Server Pages works with any ODBC-compliant database, it has been extensively tested and is designed to work with Microsoft SQL Server. ASP also supports Microsoft Access as a valid data source. Although the sample Web site and examples in this release use Microsoft Access, we recommend that Microsoft Access be used solely for development purposes and not for production. Microsoft Access was designed as a single-user desktop database, and not for server use. When multiple, concurrent users make requests of a Microsoft Access database, unpredictable results may occur.
When using the Database Access component (ADO) on Windows 95 Personal Web Server and processing multiple requests, the system may stop responding. This is caused by a known problem with the shipping version of OLE on Windows 95. To resolve this situation, download and install the DCOM for Windows 95 update from http://www.microsoft.com/oledev/olemkt/oledcom/dcom95.htm.
Deleting a database record might cause a dynamic cursor to be lost. Further attempts to move the cursor will return unexpected results. To locate the cursor in the database, use the MoveFirst method to return to the first record, then relocate the cursor.
Deleting a row in a recordset and then trying to update the row at the same location may fail. If you need to update rows that may have been previously deleted on the current recordset, you should close the recordset and requery the data to be sure all rows are visible.
Null data can be stored as a column value in a database. The corresponding Visual Basic data type is Empty, which is equivalent to an empty string. Accessing a Null value and printing it will thus display nothing. To print a string for Null values, use a statement similar to the following:
<% If IsNull(RScatalog_item("ProductSize")) Then
Response.Write("ProductSize" & "is Null") %>
When using the Microsoft Access ODBC driver, setting the MaxRecords property of the RecordSet object does not limit the number of records returned.
Attempting to insert a record using the Recordset object with the AddNew method on a Microsoft Access database will fail if the database has been configured to do replication. To resolve this, include only the fields you need to insert a new value into in a SELECT statement when opening the RecordSet.
Out-of-process components (OLE components that run in a different process from ASP, such as Microsoft Excel), are disabled by default. We recommend that you not use out-of-process components, because using these components enables subsequent users of a component to inherit the original users security context. Using out-of-process components may also have a negative effect on performance. However, you can enable out-of-process components by changing the appropriate registry entry (AllowOutOfProcCmpnts) from 0 to 1. See Configuring Registry Entries in Scripting Guide for more information.
If you choose to use out-of-process components, you should have a thorough understanding of how to use them. As an example, you must use DCOM Configuration (dcomcnfg.exe) to set up a specific identity under which to run the component. Setting a specific identity avoids problems with different users inheriting each other's security contexts. For more information on out-of-process components, refer to the Microsoft Win32 Software Development Kit documentation. The OLE Programmer's Reference describes how to set up an identity for components.
The Browscap.ini file lists property definitions for browsers that your script can check by using the Browser Capabilities component. This file will be updated as browser versions and capabilities change and may contain properties that are not documented in the Active Server Pages Component Reference. For example, the version of Browscap.ini included with this release of Active Server Pages contains a new property, Javaapplets, which specifies whether a browser supports Java applets.
Browscap.ini is installed, by default, in \Winnt\system32\inetsrv\ASP\Cmpnts. Visit http://www.microsoft.com/iis for updated versions of browscap.ini.
Here is a tip about using Notepad to create .asp files: In the Save or Save As dialog boxes, if the Save As Type box displays Text Documents (*.txt), the file name extension .txt is added to whatever you type in the File Name box. So, if you type Myfile.asp in the File Name box, the saved text file is actually named Myfile.Asp.txt. To avoid this, select All Files in the Save As Type list, or enclose the file name in quotation marks before saving.
This section discusses issues pertaining to Server-Side Includes (SSI).
This release of Internet Information Server and Peer Web Services includes enhancements to SSI syntax. For information on SSI, use your Web browser to open the SSI documentation at http://yourserver/iasdocs/aspdocs/ssi/isiall.htm.
Note Personal Web Server on Windows 95 does not support the new SSI enhancements.
You can now stop, pause, and start the WWW, FTP, and Gopher services from the File Properties dialog box. In addition, you can create or modify virtual directories from the File Properties dialog box.
To administer a service:
To add or modify a virtual directory:
There is no North American version of Microsoft Windows NT Service Pack 1a; however, the North American version of Service Pack 2 is available. Service Pack 2 includes all the fixes in Service Pack 1a and is compatible with Active Server Pages.
The North American (128-bit) version of Service Pack 2 is intended for distribution only in the United States and Canada. Export of the North American version of this service pack from the United States is regulated by the International Traffic in Arms Regulations (ITAR, 22 CFR 120-130) of the U.S. State Department, Office of Defense Trade Controls. A State Department license is required to export the North American version of Service Pack 2 outside the United States or Canada.
Microsoft will distribute the North American (128-bit) version of Service Pack 2 to U.S. or Canadian companies or persons for end-use in the U.S. or Canada only.
Ordering Information and Availability:
Customers in the 50 United States and Canada can order the the North American version of Service Pack 2 effective 12/15/96 for US $14.95 (CDN $20.95) plus customer service and handling charges of US $5 (CDN $7.50). Customers can order the product by phone.
Call (800) 370-8758; this 800 number is for customers calling in the U.S. and Canada.
Be sure to request Part Number 236-00711. Allow four weeks for delivery.