How to make Apache run ASP. NET/ASP. NET 2.0

Source: Internet
Author: User

-- The key point is ifmodule mod_aspdotnet.cpp. cpp must be added.

Don't ask me why... But I 've been asked to make Apache run ASP. NET.

It worked!

Even worked with ASP. NET 2.0 site!

Following are the instruction to Make ASP. NET work under Apache:

-InstallApache 2.0.54

-InstallMod_aspdotnet

-Add at the end of c: \ Program Files \ apache group \ apache2 \ conf \ httpd. conf the following lines

# Asp.net 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
 
  
# Mount the ASP. net/ASP application aspnetmount/sampleasp "C:/sampleasp" #/sampleasp is the alias name for Asp.net to execute # "C: /sampleasp "is the actual execution of files/folders in that location # map all requests for/asp to the Application Files alias/sampleasp" C: /sampleasp "# maps/sampleasp request to" C:/sampleasp "# Now to get to the/sampleasp type http: // localhost/sampleasp # It'll redirect http: // localhost/sampleasp to "C:/sampleasp" # Allow Asp.net scripts to be executed in the/sampleasp example
   
   
    
Options followsymlinks execcgi order allow, deny allow from all directoryindex index.htm index. aspx # default the index page to. htm and. aspx

    
  # For all virtual ASP. net webs, we need the aspnet_client files # To serve the client-side helper scripts. aliasmatch/aspnet_client/system_web/(\ D +) _ (\ D + )/(. *) "C:/Windows/Microsoft. net/framework/V $1. $2. $3/asp. netclientfiles/$4"
   
   
    
Options followsymlinks order allow, deny allow from all

    
  
 # Asp.net

-Create a directory c: \ sampleasp and insert in it the index. aspx

-Restart Apache server:

Start->
Apache HTTP Server 2.0.54->

Control Apache server-> restart

-Open explorer and navigateHttp: // localhost/sampleasp/index. aspx

If everything worked fine you shoshould get a nice Asp.net page working.

-Index. aspx-

 <% @ page Language = "VB" %>   
   
    
   
    
    

name: category: one two three

<% dim I as integer for I = 0 to 7%> sample ASP. net test
<% Next %>

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.