Running environment:Windows Server 2003 + IIS 6.0
Steps:
1. Install Microsoft. net FrameWork 3.5 SP1
2. Install MVC 2.0 RC
3. Right-click the site> Properties> main directory> Configuration> ing
A) Click "add" to bring up the "Add/edit application extension ing" window. The settings are as follows:
Executable File: C: \ WINDOWS \ Microsoft. NET \ Framework \ v2.0.50727 \ aspnet_isapi.dll
Extension:. mvc
Action restrictions: GET, HEAD, POST, DEBUG
Script Engine: select
Check whether the file exists: do not select
B) Click "insert" to bring up the "Add/edit application extension ing" window. The settings are as follows:
Executable File: C: \ WINDOWS \ Microsoft. NET \ Framework \ v2.0.50727 \ aspnet_isapi.dll
Check whether the file exists: do not select
4. Before the MVC program is released, make sure that the BIN folder of your program contains System. Web. Mvc. dll. (If not, open the reference list in the MVC project and right-click System. web. mvc, select "attribute", set "Copy local" to True (default value: False), and regenerate the project, Ssystem. web. mvc. dll will appear in the BIN folder .)
5. The program is running properly.
Final supplement:You may need to modify the default configuration in GLOBAL when publishing a project on the Internet:
Code
Routes. MapRoute (
"Default", // Route name
"{Controller}. mvc/{action}/{id}", // URL with parameters
New {controller = "Home", action = "Index", id = ""} // Parameter defaults
);