Apache supports Asp.net module mod_aspdotnet bug fixing and re-Compilation

Source: Internet
Author: User

Run on Apache. net is an amazing idea, and then I found it online. It does support it. I downloaded it and used it. There are some small bugs, for example, to write multiple cookies, only the last cookie is successfully written. If you want to use this component, it must be fixed. You can also find the source code of mod_aspdotnet on the Internet, the Apache version I used is 2.2, so I opened the source code, fixed the bug, and re-compiled the two files.

In fact, I spent a lot of time Compiling. I finally found the Official Administrator and asked for a half-day question. This is also the main reason why I am re-compiling the two files.

The compiling environment can be XP or later, vs2005 or later, and apache2.2

It cannot be compiled in batches during compilation. Use the vs command line.

Set apache22_path = E: \ apache2.2

Set the environment variable, which is the directory of apache2.2. When installing Apache, you must be sure to complete the installation. You must select any headers options, or else the compilation will fail.

Devenv mod_aspdotnet.sln/useenv/build "Release 2.2"/Project mod_aspdotnet

There are two files after compilation. One is Apache. Web. dll. it is OK to add windows GAC,

Put mod_aspdotnet.so in the modules directory under Apache

Mod_aspdotnet

This is the configuration file of the official example. You can go to other websites to check the configuration file, which is easy to find.

# Load the Apache mod_aspdotnet.so Module
#-Which in turn loads the. NET/ASP. NET Framework
#-Which in turn loads the Apache. Web. dll provider
#
Loadmodule aspdotnet_module "modules/mod_aspdotnet.so"

<Ifmodule mod_aspdotnet.cpp>

# A specific version of the. NET Common Language Runtime may be forced
# With the aspnetversion Directive; uncomment one of the lines below
# For the V1.0 or V1.1 general release versions, and refer to
# C:/Windows/Microsoft. NET/framework directory for installed versions.
# The default is the most recent installed. Net CLR version.
#
# Aspnetversion v1.0.3705
# Aspnetversion v1.1.4322

# Appear consistent with other ASP. NET hosts to the client.
# This is optional, unaware of client applications expecting it.
#
Header add X-powered-by ASP. NET

# Process these file types with the Asp.net Handler
# (Provided they fall within an aspnetmount 'ed location)
#
Addhandler Asp.net asax ascx ashx asmx aspx axd config CS csproj \
Licx REM resources resx soap VB vbproj vsdisco webinfo

# Serve the/aspnet_client files to the web browser, to handle
# JavaScript controls integrated into ASP. NET applications.
#
Aliasmatch "^ /(? I) aspnet_client/system_web/(\ D +) _ (\ D + )/(.*)"\
"C:/Windows/Microsoft. NET/framework/V $1. $2. $3/asp. netclientfiles/$4"

# Permit the/aspnet_client files to be served to web clients.
# Change C:/windows above in the aliasmatch, and below in the <directory>
# Line to reflect the root of Windows (echo % WINDIR % from the CMD prompt .)
#
<Directory "C:/Windows/Microsoft. NET/framework/V */asp. netclientfiles">
Options followsymlinks
Order allow, deny
Allow from all
</Directory>

# This <ifdefine> prevents Apache from processing this example
# Template, duplicate the contents (adjusting for your desired
#/APP-Uri and C:/path/to/APP) as Daily Times as necessary,
# Not within the <ifdefine>... </ifdefine> section
#
<Ifdefine ASP. NET-template>

# Create an ASP. NET host for requests to/APP-URI to be processed
# By C:/path/to/APP-see the alias below for actually serving
#/APP-Uri from Apache.
# This is usually the path of the web. config file for the app.
#
Aspnetmount/APP-Uri "C:/path/to/APP"

# Have Apache serve/APP-URI requests with C:/path/to/APP mounted hosted
# Some form of Alias is required, aspnetmount does not expose/APP-Uri
# Itself, through Apache.
#
Alias/APP-Uri "C:/path/to/APP"

# Permit content in C:/path/to/APP to be served (and use ASP. NET
# Conventions for the default pages .)
#
<Directory "C:/path/to/APP">
# Add 'indexes' to options below for Autoindex file listings
# Add 'regions' to options below for SSI reparsing
Options followsymlinks
# Add 'virtual' to ASPnet below for non-file resources
ASPnet files
Order allow, deny
Allow from all
Directoryindex default.htm default. aspx
</Directory>

</Ifdefine>

</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.