CoverYourASP --> Configuring your site

Free membership

Join in the fun! Sign in
Member Services

Site navigation
Download the entire site!
Search my articles
Free Magazines
Browse the directory

Send me feedback
Buy my boxer shorts

Recommend this page
Printer-friendly page

Resources I recommend
Link to my site
Advertising slashed!
About your privacy
Legal stuff
Site statistics
32 active users
1247 visitors today
1041 pages today
(only part of today)
Tools I use

Copyright © 1999-2016 James Shaw.
All rights reserved.

RSS submissions

Now open source with SourceForge!

All the configuration of the code is done in one file - include/Config.asp. I'll discuss just the lines that you have to change.

// ============================================
// database configuration
// ============================================

// OLE DB Provider constants
var sAccess9x = 'Microsoft.Jet.OLEDB.2.5';
var sAccess97 = 'Microsoft.Jet.OLEDB.3.51';
var sAccess2000 = 'Microsoft.Jet.OLEDB.4.0';
var sSQLServer = 'SQLOLEDB.1';

// which am I using?
var sDBDriver = sAccess97;

In the database section of the file change sDBDriver to whatever database you are using. The database I ship in the download is in Access 97 format, and if you have Access 97 or Access 2000 the default will probably work.

// ============================================
// email configuration - please tell me of other servers you want
// ============================================

// Email server constants
var nEmailCDONTS = 826;
var nEmailJMAIL = 657;
var nEmailASPMAIL = 781;
var nEmailASPEMAIL = 167;

// which am I using?
var nEmailServer = nEmailCDONTS;

// the host domain used to send / receive emails
var sHostDomain = "";

Similarly, set the email component that you are using. CDONTS is the default, which will work fine on Windows machines if you have the SMTP service installed. Before you can get the site to send you emails you'll have to set the sHostDomain to your domain. If you don't have your own domain, search for sHostDomain throughout the code, and change the code as necessary.

// ============================================
// password configuration - set this to your password and change often!
// ============================================
var sPassword = 'SECRET';

As discussed in Security.asp you need a password to fully access some pages. This is where you set your password.

// ============================================
// page counter and statistics gathering
// ============================================
var bStoreStats = false;

To enable statistics gathering, set the bStoreStats flag to true.

// ============================================
// cookies
// ============================================
var sCookieEmail = 'MemberEmail';
var sCookiePassword = 'MemberPassword';

When cookies are used to store the members email address and password, the names of the cookies are specified here. I recommend that you set them to something more specific to your site - mine all start CYA...

// ============================================
// base href - the URL of your pages
// ============================================
// if a string in sURLTest is found, then the offset is applied from
// sURLOffset. As an example, I want my base hrefs to be
// on production server and
// http://localhost/cya/ on development server.
var sURLTest = new Array (
   '.com',      // if this found in server name..

var sURLOffset = new Array (
   '',         // ..apply this offset

Specify here the servers that you'll run the site on, and the sub-folders that you'll use, if any. more...


Please tell me what problems you encounter, so I can help you!

Q. I'm lost. How do I setup my PC to run ASP, install your site and maybe later modify it?
A. I have new articles that contain full step-by-step instructions on how to install PWS, install my code and troubleshoot any errors you might encounter.

Featured sponsor
My favorite resources

Qualify for Free Trade Magazines

Free subscriptions to industry leading publications for those who qualify!

See my source code
wherever you see this icon...

You can also download the entire site source code for FREE!

New Proposal Kit Professional 5.1
Brand yourself as a top professional: create quotes and amazing proposals and get many legal documents free!

The latter saved me 3 times the purchase price on the first day I owned it!

I share my content

Supporting ASPRSS

Do you need a quick and easy way to link to my articles? All the information you need is published with ASPRSS...