asp.net - ExtensionlessUrlHandler 和带点的路径

标签 asp.net asp.net-mvc iis iis-7.5

无扩展 URL(带有 ExtensionlessUrlHandler-Integrated-4.0)在我的 MVC 4 应用程序中工作正常,除了其中带有点的路径,例如

/tags 工作正常

/tags/.net 不工作

要使第二个 URL 正常工作,我必须设置 runAllManagedModulesForAllRequests="true" 或删除 UrlRoutingModule-4.0 上的 managedHandler 先决条件模块和任何其他需要为该 URL 运行的模块,这意味着我回到原点,所有这些模块都将为静态请求运行(对吗?)。

有没有办法在路径中使用带点的无扩展 URL?

最佳答案

将路径属性改为星号,如path="*"

关于asp.net - ExtensionlessUrlHandler 和带点的路径,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14800872/

相关文章:

redirect - IIS 重写 - 仅将一个主机名的根重定向到 HTTPS?

c# - ASP.Net - 如何在运行时以编程方式编辑外部配置文件

c# - 单元测试未显示测试结果

c# - ASP.NET MVC。如何使用 DisplayNameFor 来创建表格标题和正文?

asp.net-mvc - “A potentially dangerous Request.Form value was detected from the client”

c# - iis重置后应用程序池被删除

c# - MSBuild 未处理的异常 : The FileName property should not be a directory unless UseShellExecute is set

asp.net - Angular-CLI .NET Core 中的index.html 是如何调用的?

asp.net - Visual Studio Express 2012 Site.Master 中出现错误 "Scripts is not declared"

c# - 以编程方式重新启动 IIS