Let Apache support ASP.NET

xiaoxiao2021-03-06  42

Apache is a widely used network server program that is not only used on UNIX / Linux platform, but also has a lot of sites on the Windows platform to give up IIS and turn to Apache.

.NET is a powerful development technology launched by Microsoft, its goal is to compete with Java. ASP.NET is ideal for web applications for SMEs, which have great improvements compared to ASP3.0.

Let's introduce a way to support APACHE supports ASP.NET.

First, there must be support for the Windows environment and .NET Framework. Also recommended to install installation .NET development tools such as .NET Framework SDK or VisualStudio.net. It should be noted that the version of Windows should be 2000,2003 and XP. The Win9x series cannot be installed .NET Framework.

Then you need to install Apache. You should use the Win32 platform Apache, version 2.0 or more. Recommend 2.0.51 version. download link:

Http://apache.freeelamp.com/httpd/binaries/win32/apache_2.0.52-win32- x86-no_ssl.msi

For details, please refer to other articles, this article is not described later.

Below you want to download and install the ASP.NET module in the Apache environment. download link:

http://www.apache.org/dist/httpd/mod_aspdotnet/mod_aspdotnet-2.0.0.msi

After the download is complete, double-click Open, all the way next to install it.

For easy management, we create a new Active directory in the HTDOCS directory, which is specifically stored .aspx files. Now you need to configure the httpd.conf file, add: Add:

# 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

# Mount the asp.net example copy of 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 el xecuted in the Active EXAMPLE

Options Followsymlinks Execcgi

ORDER ALOW, DENY

ALLOW FROM ALL

DirectoryIndex Default.htm Default.aspx

# 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 full $ 11. $ 00 ASP.NETCLIENTFILES / $ 4 "

"C: /Windows / Microsoft.Net/framework/v4p.netclientfiles">

Options Followsymlinks

ORDER ALOW, DENY

ALLOW FROM ALL

Where D: / Program Files / Apache Group / Apache2 is the installation directory of Apache, which should be changed according to the actual situation.

You can now put on the ASP.NET probe in the Active directory. After restarting Apache, you can experience ASP.NET under Apache.

Since ASP.NET under IIS and Apache is based on Common Language Runtime (CRL), the running speed of ASP.NET programs in the Apache environment will not be slower than IIS.

转载请注明原文地址:https://www.9cbs.com/read-56133.html

New Post(0)