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:
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
In most cases, the content you publish to your Web or FTP site is located in a root or home directory on your computer, such as C:\Inetpub\wwwroot\. However, there might be instances when the content is located somewhere else, or even on a remote computer.
To publish from any directory not contained within your home or root directory, you can create a virtual directory. A virtual directory is a directory that is not contained in the home directory but appears to client browsers as though it were.
You can create a virtual directory through IIS Manager or by using Windows Explorer.
Important: You must be a member of the Administrators group on the local computer to perform the following procedures.
To create a virtual directory by using IIS Manager
To create a virtual directory by using Windows Explorer
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. 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. (See Running Classic ASP on 64-bit Windows Operating System below.)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 or a Virtual Directory is quick and simple. Just right click on the web site and choose either "Add Application" or "Add Virtual Directory" to open respective dialogs (see below).
An existing Virtual directory can be marked as 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".
An important aspect of working with an Access .mdb file and files 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.
By default, the anonymous IIS user is IUSR_<MachineName>. Therefore, 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 IUSR_<MachineName> user account.
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,
Similarly, set permissions in the file folder where the uploaded files and temporary files reside.
If you use the iTextSharp extension (for PDF Export) and/or the AspNetResize extension (for image resize), note that ASP.NET Web applications run in the context of a local machine account named ASPNET (for Windows 2000 and Windows XP) or in the context of the account NETWORK SERVICE (for Windows Server 2003 or later). To read/write temporary files, you must configure the file folder (see ASP Settings) to have both Read and Write permissions for the ASP.NET user account.
Running Classic ASP on 64-bit Windows Operating System
Windows Server 2008 64-bit (IIS 7)
On 64-bit Windows 2008, IIS 7 can run both 32-bit and 64-bit worker processes simultaneously. To run 32-bit Web applications in IIS 7 on 64-bit Windows 2008 all it needs is to assign the 32-bit applications to a separate application pool in IIS and turn on the Enable 32-Bit Applications switch for that application pool. To do this, open IIS Manager, open Application Pool, select the application pool, and then click Advanced Settings. In Enable 32-Bit Applications, select True.
Windows Server 2003 64-bit (IIS 6)
On 64-bit Windows 2003, although IIS 6 supports running both 64-bit and 32-bit worker processes, it doesn't support running in both modes simultaneously. By default IIS 6 is configured to run in native 64-bit mode and work only with 64-bit worker processes, which means you can only run 64-bit Web applications (for ASP.NET applications they can only target ASP.NET version 2.0 or higher) in the native mode. In order to run 32-bit Web applications you will need to set IIS 6 to run in 32-bit mode. Note: This means all your Web applications will now run in 32-bit mode.
To enable IIS 6 to run 32-bit worker processes follow these steps:
The following article explains the details of the changes in the behavior of IIS after configuring it to run 32-bit worker processes: Running 32-bit Applications on 64-bit Windows (IIS 6.0)