Configure the ASP. NET environment in Apache

Source: Internet
Author: User

The prerequisites have been matched with the Apache environment.

Download and install 2mod_aspdotnet-2.0.0.msi (download http://httpd.apache.org/modules/ here)

 

Add the following code to the end of the httpd. conf file.

# Asp.net support
# These two configurations are global and can be placed after other response loadmodule/addhandler statement blocks.
# In my configuration, the entire configuration block below is placed at the end, not separated, which is also for convenient management
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
# The aspnetmount statement is equivalent to the mount command in Linux. it mounts the ASP program directory to a URL address.
# If ASP is not used for the entire website, it should not be hashed under. For example: aspnetmount/asptool "d :\\ www \ apache2 \ htdocs \ aspweb"
# Note: When the whole site is used, the global DocumentRoot is "D:/www/apache2/htdocs/aspweb"
Aspnetmount/"D:/phpnow/htdocs"

# Map all requests for/active to the Application Files
# It means to map all requests to '/asptool' to the mounted ASP program directory.
# In my configuration, the following sentence is commented out.
# Alias/asptool "D:/www/apache2/htdocs/aspweb"

# Allow Asp.net scripts to be executed in the active example
<Directory "D:/phpnow/htdocs">
Options followsymlinks execcgi
Order allow, deny
Allow from all
Directoryindex default.htm default. aspx index.html index. aspx
</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 must correspond to the. NET Framework installation directory.
Aliasmatch/aspnet_client/system_web/(\ D +) _ (\ D + )/(. *) "C:/win2003/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>

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.