CodeCharge Studio

Deploying ASP Applications

Before you publish a project make sure the server has the correct version of the VBScript engine. CodeCharge Studio generates ASP 3.0 which corresponds to VBScript 5.5 or higher. Most IIS servers have the correct version of VBScript installed, but if you are using Personal Web Server (PWS) you might need to upgrade the VBScript engine. The latest version of the VBScript engine can be downloaded from the Microsoft Windows Script site.

Also note that at the time of publication the latest release of the ChiliSoft ASP server, which can be run on Unix flavor machines, supports ASP 2.0 and NOT the required ASP 3.0.

Your target server must also have the necessary ODBC DSN drivers needed to connect to the database. If you are using a commercial host, the literature on their site should indicate which databases are supported. Sometimes the host supports ODBC connections, in which case you have to request that an ODBC DSN be created for you. Once the DSN has been created, you can configure the server-side database connection to use the remote DSN.

For a DSN-less connection like a Microsoft Access database, the server-side database connection has to be configured to reflect the location of the Microsoft Access database on the server. In the case where you know the exact file system location of the database file, you can simply copy the design-time connection string, paste it under the Server tab, and change the file location. For instance, if the Microsoft Access file is located at C:\Inetpub\databases\project1\database.mbd, the corresponding connection string would be:

Server Connection String

Provider=Microsoft.Jet.OLEDB.4.0;User ID=Admin;
Data Source=C:\Inetpub\databases\project1\database.mbd;
Persist Security Info=False

If you don't know the file system location of the database use the VBScript Server.MapPath() function to automatically retrieve the path to the file. You will need to edit the connection string within the Server tab of the connection settings window and include a call to the function. An example connection string using the Server.MapPath() function would be:

Using MapPath to Define file Path

Provider=Microsoft.Jet.OLEDB.4.0;User ID=Admin;Data Source=" &
Server.MapPath("database.mdb") & ";Persist Security Info=False

The database file resides in the same location as the generated common.asp page. The Server.MapPath() function retrieves the appropriate file system path and includes it in the connection string.

If you opened the common.asp file, you would see the connection string appearing:

Connection String in Common.asp

ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;
User ID=Admin;Data Source=" & Server.MapPath("database.mdb") & ";Persist Security Info=False"

If you are publishing to the same machine where CodeCharge Studio is installed, you can simply specify that the server-side connection string is the same as the design connection string.

After configuring the connection string properly, make sure that the Publish tab of the Project Settings window specifies the correct location where the files should be published. Unless you are using a virtual folder, the Server Path folder should specify a location within the root of your web server.

Press F9 or click on the Publish Project button to begin the publishing process. Once completed open one of the pages within CodeCharge Studio and switch to Live Page mode to view the finished page. Note that the browser opens the .asp page and not the .html page.

If you anticipate that your users might access the site using an unqualified domain URL such as http://www.mydomain.com/, then you should configure the server so that it opens up a .asp page by default as opposed to a .html page. Otherwise, the .asp page would need to be specified in the URL.


On-line, printable versions and updates