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:
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.
Local IIS Web Sites A local Internet Information Services (IIS) Web site is an IIS Web application on your computer. Creating or opening a local IIS Web site is useful in the following situations:
Requirements
To open an existing local IIS Web site, the preceding must be true as well as the following:
Running Local IIS Web Sites Deploying Local IIS Web Sites
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.
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'" Read http://support.microsoft.com/kb/926939 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 5, it is IUSR_<MachineName>. In IIS 6.0 and 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,
Similarly, set permissions in the folder where the uploaded file and audit trail log file reside.
Running Classic ASP on 64-bit Windows Operating System Windows Server 2008 or Windows 7 64-bit (IIS 7.x) On 64-bit Windows 2008/7, IIS 7.x can run both 32-bit and 64-bit worker processes simultaneously. To run 32-bit Web applications in IIS 7.x on 64-bit Windows 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)
Also See:
|
©2001-2012 e.World Technology Ltd. All rights reserved. |