Introduction to ASP


What Is ASP?

Microsoft Active Server Pages (ASP) is a server-side scripting environment that you can use to create and run dynamic, interactive Web server applications. With ASP, you can combine HTML pages, script commands, and COM components to create interactive Web pages or powerful Web-based applications, which are easy to develop and modify. For example, you can use the ActiveX Data Objects (ADO) components to add database connectivity to your Web pages.


How ASP Works

When you incorporate ASP into your Web site, here's what happens:

  1. The user brings up a Web site where the default page has the extension .asp.
  2. The browser requests the ASP file from the Web server.
  3. The server-side script begins to run with ASP.
  4. ASP processes the requested file sequentially (top-down), executes any script commands contained in the file, and produces an HTML Web page.
  5. The Web page is sent to the browser.

Because your script runs on the server, the Web server does all of the processing and standard HTML pages can be generated and sent to the browser. This means that your Web pages are limited only by what your Web server supports.


Internet Information Services (IIS)

To run ASP on your computer you will need the Internet Information Services (IIS) component installed on your machine.

IIS is a web server application and set of feature extension modules created by Microsoft for use with Microsoft Windows. IIS is not turned on by default when Windows is installed.

Read Internet Information Services for more information.


Creating Virtual Directories in IIS 7 (Windows Vista or Later)

The IIS manager user interface consists of three panes.

The left hand side pane is Connections, the middle pane is Workspace and the right hand side pane is Actions.

The Connections pane lists application pools and websites. The workspace pane consists of two tabs at the bottom namely Features View and Content View. The Features View allows you to work with the settings of the selected item from Connections pane whereas the Content View displays all the child nodes (content) of the selected item.

Application pool is a group of IIS applications that are isolated from other application pools. Each application pool runs in its own worker process. Any problem with that process affects the applications residing in it and not the rest of the applications. You can configure application pools individually.

In order to create a new application pool, select Application Pools under Connections pane. Then click on Add Application Pool... from Actions pane. This will open a dialog as shown below:

Specify a name for the new pool to be created. Select .NET framework version that all the applications from the pool will use. You must select .NET Framework v2.0.50727 or higher.

Also select pipeline mode. There are two pipeline modes viz. integrated and classic. The integrated mode uses the integrated request processing model whereas the classic mode uses the older request processing model. Click OK to create the application pool.

Your new application pool will now be displayed in the Workspace pane. To configure the application pool click on the Advanced Settings... option under Actions pane. The following figure shows many of the configurable properties of an application pool.

If you use 64-bit Windows, set Enable 32-Bit Applications to True.

To create a new web site, select Web Sites node under Connections pane and then click on Add Web Site... under Actions pane. This opens a dialog as shown below:

Here, you can specify properties of the new web site including its application pool and physical location.

Creating an IIS application under an existing web site is also quick and simple. Just right click on the web site and choose either Add Application... to open respective dialogs (see below).


An existing virtual directory can be converted to an IIS application by right clicking on it and selecting Convert to Application.

Once you create a website or an IIS application, you can then set several ASP related configuration properties via Workspace pane.

Go to ASP -> Debugging Properties -> Send Errors to Browser, set it to True,

You may encounter the following error messages when you run ASP pages with IIS 7:

1. Error message when you request an ASP page that connects to an Access database in IIS 7.0: "Microsoft JET Database Engine error '80004005'"


2. Error message when you request an ASP page: "An error occurred on the server when processing the URL. Please contact the system administrator"

Go to Internet Options -> Advanced, disable Show friendly HTTP error messages.



Configuring Permissions

An important aspect of working with an Access .mdb file and file upload to a folder on the Web server is to correctly configure permissions.

When a Web application uses an Access database, the application must have Read permission to the .mdb file so the application can access the data. Additionally, the application must have Write permission to the folder that contains the .mdb file. Write permission is required because Access creates an additional file that has the extension .ldb in which it maintains information about database locks for concurrent users. The .ldb file is created at run time.

To use an Access database in an ASP Web application, you must configure the folder that contains the Access database to have both Read and Write permissions for the IIS user account.

The default anonymous IIS user depends on IIS version. In IIS 7 it can be NETWORKSERVICE or IUSR. In IIS 7.5 it depends on Application Pool, read Application Pool Identities for detail.

If you specify database path, ASPMaker also creates the database folder but you may need to set the permissions yourself. To set permissions in the database folder,

  1. In Windows Explorer, move to the root folder for the Web site. e.g. C:\Inetpub\wwwroot\ExampleSite.
  2. If the database folder does not already exist, create one.
  3. Right-click the database folder, click Properties, and then click the Security tab.
  4. Under Group or user names, look for or add the user.
  5. Verify that the account has Read and Write permissions for the database folder.

Similarly, set permissions in the folder where the uploaded file and audit trail log file reside.




Also See:

Application Root



 ©2001-2017 e.World Technology Ltd. All rights reserved.