PersonalASP Version 2 - User GuideA guide to installing, developing and testing PersonalASP based applications. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Contents | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Introduction | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Active Server Pages (ASP) technology has provided an excellent environment for developers to rapidly create stable, feature rich, data driven browser-based applications. PersonalASP allows applications to be developed in the same way for local execution on the PC, without the need for a local web server to be installed and without changing any Internet Explorer configuration. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The PersonalASP evaluation version is available from the ModeZero web site at
www.ModeZero.net/PersonalASP. The
code is fully functional and not time limited, so developers can explore its
full capabilities in their own time. Simply download and run the install application from the PersonalASP web site. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The pre-installed ModeZero domain home page contains a brief description of PersonalASP and links to 3 sections described below: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Licence Information | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This page displays all the currently installed licences, along with their state (valid, invalid etc). | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
VBScript Samples | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This is a root page with links to a number of samples that demonstrate key features of PersonalASP support. Each sample explains briefly what it demonstrates and a link is provided to view the source of the page. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Jscript Samples | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
New in Version 2 is support for the JScript language. As with VBScript, the root page contains links to pages demonstrating key JScript features. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
All PersonalASP URLs have the following structure: pasp://<application-domain>/<page-path> | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Where the application domain is between the
double slash and the next following slash. As with ASP applications on web
servers, information such as Cookies and Sessions cannot be shared between
application-domains, each one is self-contained. If application source files need to be stored somewhere other than under the <install-path>\PAspPages directory, this can be achieved using the VirtualDirs.txt file. It contains a list of mappings from virtual domain names to physical locations, in the following format:
[VirtualDirName] > [Physical Path] (with no trailing slash) (Note: Internet Explorer will have to be restarted before updates to the VirtualDirs.txt file are detected). | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ASP pages can be written in any text editing applications, from Notepad upwards. Those already familiar with ASP may well be using tools such as Visual Interdev, which gives useful Intelisense and syntax colouring. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The example below was developed using Visual Interdev and tested on a machine
running IIS, before being tested against PersonalASP. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Write the ASP code | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Below is an example of some rather verbose code to output a Hello World message. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- Hello.asp-
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Create a new PersonalASP ‘Application Domain’ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The installation process creates a directory called PAspPages in the installation
directory. The first level of directories contained in \PAspPages are treated
as Application Domains (for example ModeZero is created by the
install for the demonstration pages). | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Test it | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
To see the finished product, open Internet Explorer and type pasp://dev/Hello.asp as
the URL. The friendly message will appear the the browser. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Creating pages that use the database facilities on PersonalASP is simple and again consistent with the IIS/ASP, using ADO. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Data Source Path Please note that the full data source path (including drive letter) or full UNC path, should be included when connecting to a database, eg: g_sDSN = "PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=E:\PersonalASP\PAspSites\ModeZero\_db\TestCEDB.mdb" | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
For more information on database driven pages, have a look at the source to the demonstration database pages; VBDbDSN.asp,VBDemoDB.asp and JSDbDSN.asp,JSDemoDB.asp. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
If there is an error in an ASP script, the error information page format is as follows:
__ASP Error ( [error-code], [approx-line-no], [approx-character] )
Info : [ error-description ]
[ error-line-text ]
(where possible a '^' will appear under the word that caused the error)
approx-line-no
Viewing the Pre-processed Script A file called LastProcessedAsp.txt can be generated in the \PAspPages\_system directory, by adding an underscore (_) at the very end of the URL, eg: Each time a page is called with a trailing underscore the LastProcessedAsp.txt file will be overwritten with the pre-processed script for that page. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The easy way in which ASP can be developed
also makes it vulnerable to third parties copying or ‘tweaking’ the code. This can
cause problems if technical support are trying to resolve problems and the code
has been changed or may result in stolen intellectual property. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Discussion Group | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
To get the latest version of this document please visit http://www.modezero.net/PersonalASP/support.htm. ModeZero Ltd, 2002. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||