MVC 伪静态html页面的访问
不需要配置IIS来实现1. 路由配置
context.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}.html",
defaults: new { controller = "Home", action = "Index",> );
2.Web.config设置如下节点
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"></modules><!--关键-->
</system.webServer>
页:
[1]