The first is to use Apache, but to support ASP.net, only installed on the Windows platform, my environment is
Windows XP
First you have to install
dotNetFramework
To tell you the truth, I have only recently contacted. NET, so many concepts are not understood, such as the dotnetframework here
But I installed vistual Studio 2008, so by default I've got this thing loaded,
You can check the C:/windows/microsoft.net/framework directory is not there, there is not
Like v2.0.50727 this v+ number of directories, if any, instructions have been installed on the Internet to find a Web site
Http://download.microsoft.com/download/7/b/9/7b90644d-1af0-42b9-b76d-a2770319a568/dotnetfx.exe
But there's no proof, it's called dotNetFramework.
Httpd-2.2.15-win32-x86-no_ssl.msi
Mod_aspdotnet-2.2.0.2006-setup-r2.msi
Apache's asp.net module has been isolated from the Apache module family and can now be found in the following locations
Http://sourceforge.net/projects/mod-aspdotnet
Click Download, and in the open page, note the corresponding Apache version download (for Apache2.0 or Apache2.2)
I got the 2.2 version,
And then just install it in sequence.
Httpd-2.2.15-win32-x86-no_ssl.msi
Mod_aspdotnet-2.2.0.2006-setup-r2.msi
Out.
Finish loading Httpd-2.2.15-win32-x86-no_ssl.msi
Open http://localhost/
The word "it works!" shows the success of Apache Ampere, the next step is about asp.net configuration
Install Mod_aspdotnet
Mod_aspdotnet-2.2.0.2006-setup-r2.msi, which will allow you to select the Apache installation directory,
Then configure the apache-/conf/httpd.conf file and add the following at the end of the file
# asp.net support # these 2 configurations are global and can be placed after other response Loadmodule/addhandler statement block # In my configuration, the following entire configuration block is placed at the end, not separated 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 v Sdisco Webinfo # The entire configuration below can be placed in a virtual host <ifmodule mod_aspdotnet.cpp> # Mount The asp.net example # application The statement is equivalent to the Mount command in Linux, which is to mount the ASP program directory to a URL address # if not the entire site is ASP, should not be hung in '/'. such as: Aspnetmount/asp "c:/program_/apache2/htdocs/asp" # Note: When the whole station is adopted, the global DocumentRoot is "c:/program_/apache2/htdocs/asp" # This sentence is to say that if you visit http://localhost/asp/, you are actually accessing the # "c:/program_/apache2/htdocs/asp" aspnetmount/asp c:/program_/apache2/ Htdocs/asp "# Map all requests for/active to the application files # meaning that all the requests to '/asptool ' are mapped to the downloaded ASP program directory # in my configuration, the following sentence is commented out . #就是起了个别名 #如果没注释掉, description access #http://localhost/asp2/check.aspx #与http://localhost/asp/check.aspx is accessing the same file #Alias/asp2 "c:/ program_/apache2/htdocs/asp "# Allow asp.net scripts to is executed in the active example <Directory "c:/program_/apache2/htdocs/asp" > Options followsymlinks execcgi order Allow,deny allow to all DirectoryIndex default.htm Default.aspx index.html </Directory> # for all virtual asp.net webs, we need the Aspnet_c lient files # to serve the Client-side helper scripts. # Note: The following two lines need to correspond to the directory of the. Net Framework installation #xp the corresponding directory under the general corresponding c:/windows/microsoft.net/#另外除了正反正反斜线外, the best letter case is the same as the case of your path, # Apache is case-sensitive in some places (this new contact is not very clear) #另外windows the path is "/" differentiated, and the configuration file is written "/" # "c:/program_/apache2/htdocs/asp" and "c:// Program_//apache2//htdocs//asp "equivalent aliasmatch/aspnet_client/system_web/(/d+) _ (/d+) _ (/d+) _ (/d+)/(. *)" C:/WINDOWS/ Microsoft.net/framework/v$1.$2.$3/asp.net*files/$4 "<directory" c:/windows/microsoft.net/framework/v*/asp.net *files "> Options followsymlinks Order allow,deny allow to all </Directory> </IfModule> # asp.net support end.
Note the comments in the configuration file, some of the paths require you to make some adjustments
A file that tests whether ASPX works
Unpack the file, put it in the c:/program_/apache2/htdocs/asp/directory, restart Apache
Access to http://localhost/asp/check.aspx, if the page is learning to display, then support asp.net
#================================= without formatting, easy to copy
# asp.net support
# these 2 configurations are global and can be placed after other response Loadmodule/addhandler statement blocks
# in my configuration, the following entire configuration block is placed at the end, not separated
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
# The entire configuration below can be placed in a virtual host
<ifmodule mod_aspdotnet.cpp>
# Mount The asp.net example application
# The Aspnetmount statement is equivalent to the Mount command in Linux, which is to mount the ASP program directory to a URL address
# if not the entire site is ASP, should not be hung in '/'. such as: aspnetmount/asp "c:/program_/apache2/htdocs/asp"
# Note: When the whole station is adopted, the global DocumentRoot is "c:/program_/apache2/htdocs/asp"
#这一句是说如果你访问http://localhost/asp/, is actually visiting
# "C:/program_/apache2/htdocs/asp"
Aspnetmount/asp "C:/program_/apache2/htdocs/asp"
# MAP all requests for/active to the application files
# means to map all requests to '/asptool ' to the downloaded ASP program directory
# in my configuration, the following sentence is commented out.
#就是起了个别名
#如果没注释掉, description Access
#http://localhost/asp2/check.aspx
#与http://localhost/asp/check.aspx is accessing the same file
#Alias/asp2 "C:/program_/apache2/htdocs/asp"
# Allow asp.net scripts to is executed in the active example
<directory "C:/program_/apache2/htdocs/asp" >
Options FollowSymLinks execcgi
Order Allow,deny
Allow from all
DirectoryIndex Default.htm Default.aspx index.html
</Directory>
# for all virtual asp.net webs, we need the aspnet_client files
# to serve the Client-side helper scripts.
# Note: The following two lines require a directory that corresponds to the. Net Framework Installation
#xp the corresponding directory below the general corresponding c:/windows/microsoft.net/
#另外除了正反正反斜线外, the case of the best letter is the same as the case of your path,
#apache有些地方是区分大小写的 (This new contact is not very clear)
The path on the #另外windows is distinguished by "/" and is written in the configuration file as "/"
# "c:/program_/apache2/htdocs/asp" and "c://program_//apache2//htdocs//asp" equivalence
aliasmatch/aspnet_client/system_web/(/d+) _ (/d+) _ (/d+) _ (/d+)/(. *) "c:/windows/microsoft.net/framework/v$1.$2.$3/ Asp.net*files/$4 "
<directory "C:/windows/microsoft.net/framework/v*/asp.net*files" >
Options FollowSymLinks
Order Allow,deny
Allow from all
</Directory>
</IfModule>
# asp.net supports end.