Experience in running ASP. NET on APACHE

Source: Internet
Author: User
Tags php server

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.

 
 
  1. # Asp.net support 
  2. # These two configurations are global and can be placed after other response LoadModule/AddHandler statement blocks. 
  3. # In my configuration, the entire configuration block below is placed at the end, not separated, which is also for convenient management 
  4. LoadModule aspdotnet_module"Modules/mod_aspdotnet.so" 
  5. AddHandler asp.net asax ascx ashx asmx aspx axd config cs csproj licx rem resources resx soap vb vbproj vsdisco webinfo 
  6.  
  7. # The entire configuration section below can be placed in the VM 
  8. <IfModule mod_aspdotnet.cpp> 
  9.  
  10. # Mount the asp.net example application 
  11. # The AspNetMount statement is equivalent to the mount command in Linux. it mounts the Asp program directory to a URL address. 
  12. # If Asp is not used for the entire website, it should not be hashed under. For example: AspNetMount/asptool "D :\\ www \ Apache2 \ htdocs \ aspweb" 
  13. # Note: When the whole site is used, the global DocumentRoot is "D:/www/Apache2/htdocs/aspweb" 
  14. AspNetMount/"D:/PHPnow/htdocs" 
  15.  
  16. # Map all requests for/active to the application files 
  17. # It means to map all requests to '/asptool' to the mounted Asp program directory. 
  18. # In my configuration, the following sentence is commented out. 
  19. # Alias/asptool "D:/www/Apache2/htdocs/aspweb" 
  20.  
  21. # Allow asp.net scripts to be executed in the active example 
  22. <Directory"D:/PHPnow/htdocs">
  23. Options FollowSymlinks ExecCGI
  24. Order allow, deny
  25. Allow from all
  26. DirectoryIndexDefault. HtmDefault. Aspx index.html index. aspx
  27. </Directory> 
  28. # For all virtual asp.net webs, we need the aspnet_client files 
  29. # To serve the client-side helper scripts. 
  30.  
  31. # Note: The following two lines must correspond to the. Net Framework installation directory. 
  32. AliasMatch/aspnet_client/system_web/(\ d +) _ (\ d + )/(.*)"C:/WIN2003/Microsoft. NET/Framework/v $1. $2. $3/asp. netClientFiles/$4" 
  33.  
  34. <Directory"C:/Windows/Microsoft. NET/Framework/v */asp. netClientFiles">
  35. Options FollowSymlinks
  36. Order allow, deny
  37. Allow from all
  38. </Directory>
  39.  
  40. </IfModule> 
  41. # Asp.net supports End. 
  42.  

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.

  1. ASP. net mvc jQuery Delete Link
  2. Introduce jquery jqrte control in ASP. net mvc Framework
  3. Sample ASP. net mvc project: Suteki. Shop
  4. Example of ASP. net mvc three-tier architecture
  5. The concept of dependency injection in ASP. net mvc Architecture

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.