1.config

<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<modules runAllManagedModulesForAllRequests="true" />

2.RouteConfig

routes.MapRoute(
"PRODUCT", // id伪静态
"{controller}/{_id}.html",// 带有参数的 URL
new { controller = "Product", action = "Detail", _id = UrlParameter.Optional }// 参数默认值
);
routes.MapRoute(
"Tie", // id伪静态
"{controller}/{_id}.html",// 带有参数的 URL
new { controller = "Tie", action = "Detail", _id = UrlParameter.Optional }// 参数默认值
);

05-11 11:29