Key Points of running ASP. NET on APACHE 1. Why not use IIS
When I use asp.net to develop web pages, selecting IIS for servers is definitely the best web page deployment solution. It seems nonsense to say this, because they are all Microsoft's own products. Of course, it will be better to combine them. However, I encountered a situation where I considered non-IIS asp.net deployment solutions.
The operating system I use is WINXP and Ghost XP. When installed, IIS is not installed by default, to download an independent IIS installation package or use the original system disk to add this IIS component to the control panel. In such an unprofessional environment, there are many IIS problems, such as system updates that may cause IIS to be unavailable.) Sometimes, if IIS is faulty, it is useless even if IIS is reinstalled, at this time, we only need to reinstall the system, so it is especially annoying. Especially after using the system for a while, we have installed a lot of software and really don't want to reinstall the system. So now I think of asp.net server building options outside of IIS.
Key Points of running ASP. NET on apache ii. files required
1. PHPnow. Including PHP, Apache, and MySQL, As long as Apache is used ,......)
2. Microsoft. NET Framework.
3. asp.net module of Apache.
Key Points of running ASP. NET on APACHE 3. configuration process
1. Install Microsoft. NET Framework. The installation will be completed after the Next step.
2. Install the Apache server. Decompress the PHPnow installation package and run Setup. cmd installation is complete. For details about the installation method, refer to my other tutorial "using Zend Studio + PHPnow + Zend Debugger to build a PHP server debugging environment".) because I plan to use the PHP web page again, I used the PHPnow Integrated Installation Package instead of installing Apache separately.
3. Install the asp.net module of Apache. Install the downloaded installation file. The installer will initialize and automatically find the Apache installation directory. If you find any error, You can manually adjust it. Note: The mod_aspdotnet version must correspond to the Apache version installed by yourself ). Finally, configure Apache-20/conf/httpd. conf file, open this file with notepad, append the following configuration node at the end of the file, and start with "#" as the comment part. Also, change the directory in the corresponding configuration to your actual directory.
The following Apache configuration method and comments are from the network, which is unknown to the author.
- # 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
-
- # The entire configuration section below can be placed in the VM
- <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
- DirectoryIndexDefault. HtmDefault. 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>
- # Asp.net supports End.
-
Key Points of running ASP. NET on APACHE 4. Running and testing website instances
After completing the above installation and configuration, you can now put your own simple asp.net site program or the simple asp.net site program downloaded to the htdocs directory in the Apache website directory ), enter http: // 127.0.0.1 in the browser to access the site. For more information, see my other tutorial "using Zend Studio + PHPnow + Zend Debugger to build a PHP server debugging environment". Here, why do I emphasize the need to test a "simple" website? I found that there are still some problems in this running environment. Please refer to the fifth point below.
Key points for running ASP. NET on APACHE 5. Problems
In the above-established asp.net runtime environment, I tested the easy-to-use SiteFactory CMS and found that there were many problems and it was impossible to run normally. It is understood that this server environment is correct. the Identity Authentication Mode of NET is not supported. In addition, I also found that the support for sub-directories also encountered some strange problems. Therefore, we can conclude that this runtime environment is defective and should be used with caution, you can try it on a small website or a small test.
- ASP. net mvc jQuery Delete Link
- Introduce jquery jqrte control in ASP. net mvc Framework
- Sample ASP. net mvc project: Suteki. Shop
- Example of ASP. net mvc three-tier architecture
- The concept of dependency injection in ASP. net mvc Architecture