📄 readme-asp.txt
字号:
Introduction:
This document contains instructions on how to configure and install the downloaded ASP application. It assumes that:
1. You have some basic knowledge of server and database technologies.
2. You have a web server where the application will be deployed and if applicable, a database server as well.
3. That your web server is capable of serving the web pages of the script language in which the application is written, in this case ASP.
When you download the application, you should find the following components contained in the zip archive:
1. Language specific script files and html template files if you downloaded the template version.
2. A database file or a SQL script file that can be used to recreate the database.
3. A folder containing images if applicable.
Installation:
The installation process is pretty straightforward and requires minimal adjustment of the application files. Proceed as follows:
1. Unzip the files into a folder within your web server hierarchy from where the application will be served. Ensure that the folder name does not have spaces in it. During the process of unzipping, make sure that the files are unzipped to their respective folders. Don't simply open the zip archive and drag all the files to the same folders. For the application to work correctly, some files such as the image files need to be in specific folders.
2. Once you have unzipped the files, the next task is to alter the database connection string to reflect the current location/name of the database. Follow the relevant instructions below depending on the type of connection that you want to use:
ODBC Connection
To Configure an ODBC connection:
(a) Use the ODBC option in Control Panel to setup a system DSN for the application database. The database file is located in the main folder of the application. In the interest of security, you can and are encouraged to move the database file to a more secure location outside the web server hierarchy. Your application will work fine as long as the DSN you configure points to the correct location of the database file. Ensure that the DSN is a system DSN so that it will be available to all users.
(b) Open the file 'Common.asp' which is in the main folder of your application path.
(c) Look for the connection string statement which begins with the word 'strConn = '. Its basic format is:
strConn = "argument1=value1; argument2=value2; argument3=value3"
(d) Using the guidelines below, change the statement to look something like the example shown below:
strConn = "Provider=MSDASQL;Persist Security Info=False;User ID=Admin;Data Source=Bookstore"
where:
Provider: Refers to the database provider to be used for the connection. For an MS Access database connection, this should be 'MSDASQL'. If left off, this option defaults to MSDASQL which is Microsoft's OLE DB Provider for ODBC but you should explicitly specify it for the sake of clarity.
Persist Security Info: Set this value to false to disallow saving of the security information or true if you want the security information to be saved.
User ID and Password: Used to specify user authentication values. A user name of "Admin" and a blank password are the defaults.
Data Source: This is the name of the ODBC DSN you created in Control Panel.
(e) If you have configured authentication for your database, locate the following two statements below the connection string statement and set their values accordingly:
strLogin = "username"
strPassword = "password"
Jet Database Connection
Microsoft.Jet.OLEDB.4.0 is the OLE DB provider for Access. To connect to an Access database using this provider, the only other attribute required to make a connection is the Data Source attribute which is used to specify the full path and file name of the Access .mdb file. A minimal OLE DB Provider for Jet connection string would therefore look something like this:
strConn = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=C:\path\filename.mdb"
For the sake of security, you might want to place your database file in a folder other than that where the web pages reside. For instance, you could place you database in the folder c:\Projects\Databases\AccessDB.mdb which is not in the web server hierarchy. The corresponding Jet connection string for the above database would be:
strConn = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source= c:\Projects\Databases\AccessDB.mdb"
The only other commonly used parameters are User ID and Password which are used to specify user authentication values. A user name of "Admin" and a blank password are the defaults, resulting in a connection string similar to that shown below:
strConn = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source= c:\Projects\Databases\AccessDB.mdb; User ID=admin; Password="
If you have configured authentication for your database, locate the following two statements below the connection string statement and set their values accordingly:
strLogin = "username"
strPassword = "password"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -