方法一:iis配置伪静态
方法二:项目配置伪静态
网站配置文件web.config
<system.webserver>
<handlers>
<add name="html_pagehandlerfactory" path="*.html" verb="*" type="system.web.ui.pagehandlerfactory" resourcetype="unspecified" precondition="integratedmode"/>
</handlers>
</system.webserver>
路由配置页面routeconfig.cs
routes.maproute(
"action1html", // action伪静态
"{controller}/{action}.html", // 带有参数的 url
new { controller = "home", action = "index", id = urlparameter.optional }// 参数默认值
);
如对本文有疑问, 点击进行留言回复!!
使用Visual Studio2019创建C#项目(窗体应用程序、控制台应用程序、Web应用程序)
C#实现获取本地内网(局域网)和外网(公网)IP地址的方法分析
网友评论