且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

ASP.NET MVC 路由 - 向路由添加 .html 扩展名

更新时间:2022-12-08 19:41:19

您猜测 IIS 处理程序可能在 MVC 可能正确之前获取请求.

You're guess that an IIS handler is probably grabbing the request prior to MVC is likely correct.

假设 IIS 7:http://technet.microsoft.com/en-us/library/cc770990(v=ws.10).aspx

您需要在 IIS 中编辑 .html 处理程序才能使用 ASP.NET.

You need to edit the .html handler in IIS to use ASP.NET.

您可以在 II6 映射部分的应用配置中的主目录选项卡下的网站属性中找到它.

You can find it in the website properties under the home directory tab in app configuration in the mappings section in II6.

类似(版本可能不同)的内容:C:windowsmicrosoft.netframeworkv4.0.30319aspnet_isapi.dll 是处理 .html 文件所需的.

Something along the lines of (version may be different): C:windowsmicrosoft.netframeworkv4.0.30319aspnet_isapi.dll is what you need to handle the .html files.