Deployment of Asp.net MVC 2 RC on IIS

Source: Internet
Author: User

1. If you directly deploy Asp.net MVC2 RC on iis5.1, the page cannot be displayed, probably because path ing does not work.

 

Solution:

 

1. In routes. maproute (
"Default", // route name
"{Controller}/{action}/{ID}", // URL with Parameters
New {controller = "home", Action = "Index", id = ""} // parameter defaults
); Add a fixed suffix to the Controller. MVC is as follows:

Routes. maproute (
"Default", // route name
"{Controller}. MVC/{action}/{ID}", // URL with Parameters
New {controller = "home", Action = "Index", id = ""} // parameter defaults
);

2. added the. MVC ing in the IIS application configuration.
Method: IIS Site properties => directory => Configuration => ing => Add => executable files
C:/Windows/Microsoft. NET/framework/v2.0.50727/aspnet_isapi.dll

The Extension:. MVC action can be set to get, Head, post, and debug.

The "Script Engine" must be selected, and the "check file existence" option cannot be selected,
3. If the homepage still cannot be displayed normally, modify the default. aspx. CS file.

Response. Redirect ("~ /Home "); ==> response. Redirect ("~ /Home. MVC ");

Reference: http://blogs.microsoft.co.il/blogs/dorony/archive/2007/12/15/using-asp-net-mvc-on-iis-5.aspx

 

2. Deploy Asp.net MVC2 RC on IIS6. You only need to configure IIS and do not need to modify the global. asax file.

Reference: http://tech.ddvip.com/2009-07/1248440060126276.html

 

3. Deploy Asp.net MVC2 RC on iis7. I have not verified

Reference: http://www.cnblogs.com/cnblogsfans/archive/2009/01/16/1377218.html

 

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.