[Asp.net] Using ASP. net mvc on IIS 5

Source: Internet
Author: User
This is a small note for people trying to play with the MVC framework, and that are currently using Windows XP. if you dislike the ASP. NET development server that comes by default with Visual Studio as much as I do, you 've switched your MVC application to work against IIS already. WINXP is running IIS 5, and you'll notice that the routing will stop working for you once you make that switch.

For instance, a request for/products/categories, where products is a controller and categories is an action on the controller, will fail. the problem is that IIS never routes this request to ASP. net. since you are not asking for. ASPX page, there's no way for it to know that it needs to load ASP. net at all. so you have to tell it to map all the requests to ASP. net. you'll do it like this:

1. right-click your application virtual directory on inetmgr.exe.
2. properties-> virtual directory tab-> configuration.
3. add a new mapping extension. the extension shocould be. *, which will be mapped to the executable c: \ windows \ Microsoft. net \ framework \ v2.0.50727 \ aspnet_isapi.dll, or the appropriate location on your computer (you can simply copy this from the mapping. aspx files ). on the mapping uncheck "check that file exists ".
4. 3 x OK and you're good to go.
5. if you want, you can apply this setting to all your web sites. in step 1, click on the "Default web site" Node instead of your own virtual directory, and in step 2 go to the "home directory" tab. the rest is the same.

now you 've mapped every request on the web site to ASP. net. to check that it works you can request a non existing HTML file on your web-site and see that the error you get is with an ASP. net footer.
published Saturday, December 15,200 7 am by dorony

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.