Apache is a widely used network server program. It is not only widely used on UNIX/LINUX platforms, but also many websites on Windows platforms that have abandoned IIS and switched to Apache.
. NET is a powerful development technology launched by Microsoft. Its goal is to compete with Java. ASP. NET is very suitable for small and medium-sized enterprise Web applications, and its performance is greatly improved compared with ASP3.0.
The following describes how to enable Apache to support ASP. NET.
First, you must have support for the Windows environment and. NET Framework. It is also recommended to install and install. NET development tools such as. NET Framework SDK or Visual Studio. NET. Note that Windows versions are 2000, 2003, and XP. The. NET Framework cannot be installed in the Win9X series.
Then install Apache. Use Apache of Win32 platform, version 2.0 or later. Version 2.0.51 is recommended. :
Entering http://apache.justdn.org/httpd/binaries/win32/
Select a version later than 2.0 (. msi suffix)
For more information about the installation process, see other articles.
Download and install the ASP. NET module in the Apache environment. :
Address 1: Enter the http://httpd.apache.org/cli/
Select Download the mod_aspdotnet 2.0.0. msi installer
Address 2: http://cndyd.net/mod_aspdotnet-2.0.0.msi
The installation path must be the same as that of Apache. Otherwise, the installation will fail.
To facilitate management, we create an active directory under the htdocs directory to store the. aspx file. Now, to make Apache support ASP. NET, You need to configure the httpd. conf file and add the following at the end of the file:
- #asp.net
- LoadModule aspdotnet_module "modules/mod_aspdotnet.so"
-
- AddHandler asp.net asax ascx ashx asmx aspx axd config cs csproj \
- licx rem resources resx soap vb vbproj vsdisco webinfo
-
- < IfModule mod_aspdotnet.cpp>
-
- # Mount the ASP.NET example application
- AspNetMount /active "D:/Program Files/Apache Group/Apache2/htdocs/active"
-
- # Map all requests for /active to the application files
- Alias /active "D:/Program Files/Apache Group/Apache2/htdocs/active"
-
- # Allow asp.net scripts to be executed in the active example
- < Directory "D:/Program Files/Apache Group/Apache2/htdocs/active">
- Options FollowSymlinks ExecCGI
- Order allow,deny
- Allow from all
- DirectoryIndex Default.htm Default.aspx
- < /Directory>
-
- # For all virtual ASP.NET webs, we need the aspnet_client files
- # to serve the client-side helper scripts.
- AliasMatch /aspnet_client/system_web/(\d+)_(\d+)_(\d+)_(\d+)/(.*) \
- "C:/Windows/Microsoft.NET/Framework/v$1.$2.$3/ASP.NETClientFiles/$4"
- < Directory \
- "C:/Windows/Microsoft.NET/Framework/v*/ASP.NETClientFiles">
- Options FollowSymlinks
- Order allow,deny
- Allow from all
- < /Directory>
-
- < /IfModule>
D:/Program Files/Apache Group/Apache2 is the installation directory of Apache, which should be changed according to the actual situation.
Now you can place the ASP. NET probe in the active Directory. After restarting Apache, you can experience the ASP. NET environment supported by Apache.
Because ASP. NET in IIS and Apache runs on the basis of Common Language Runtime (CRL), ASP. NET programs in Apache are not slower than those in IIS.
- XML Web Service Method of ASP. NET
- XML data displayed on the ASP. NET page
- What is iframe asp. NET?
- ASP. NET lifecycle display
- Solve the Problem of ASP. net ajax script errors