Tutorial on deploying ASP. net mvc 2.0 on IIS6 and iis7

Source: Internet
Author: User

MyProgramDevelopment Environment:

System: win7

IIS: iis7

Development Tool: vs2008 SP1

MVC version: ASP. net mvc 2.0 RC

 

Before deploying an MVC application, make sure that the bin folder containsSystem. Web. MVC. dll(Very important),

 

If no, open the reference list in your MVC project,

 

Right-clickSystem. Web. MVC, Select "properties" and go to the following window:

 

Set "Copy local" to true (default value: false), and then generate the project,System. Web. MVC. dllIt will appear in the bin folder.

 

 

First, let's talk about the iis7 environment that is the easiest to deploy:

My system is Windows 7. I have integrated iis7 in Windows 7 and deployed ASP on Windows 7. net MVC 2.0 program is very easy, as long as the site application pool is set to the "integration" method, you can.

(In fact, the application is integrated by default for site creation under iis7, that is, the MVC site created on iis7 is supported by default)

 

 

After selecting the integration mode, you can see the configuration items of "*. MVC" in "handler ing" in "function view:

 

 

 

In this way, you can run the MVC program.

 

Next we will talk about the IIS6 configuration on Win 2003:

Create a site on IIS6 and click "main directory" -- "" configuration "in site properties. The following window is displayed:

Insert a ing in the "wildcard application ing" below, and submit the executable file. net "aspnet_isapi.dll", the default address is generally in "C: \ WINDOWS \ Microsoft. net \ framework \ v2.0.50727 \ aspnet_isapi.dll"

 

At this point, IIS6 is integrated with MVC.

 

 

Finally, let me remind you that if there is noSystem. Web. MVC. dllAccording to the above configuration, it is certainly not successful, the precondition isSystem. Web. MVC. dllWhether the file is in the bin folder of the project.

 

 

 

 

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.