MVC2 + ASP.NET 4.0 + IIS6 +无扩展名 URL,不再需要通配符映射?
我注意到asp.net 4.0现在安装了一个顶级isapi插件(在iis6中),这样它就可以检查到达服务器的每个请求。现在是否应该允许我们运行具有无扩展 URL 的 MVC 应用程序,并让 aspnet isapi 正确处理它们,而不需要通配符映射(并避免相关的性能损失)?我还没有找到任何关于此的文章,也没有时间进行调查。谢谢
I noticed that asp.net 4.0 now installs a top-level isapi plugin (in iis6), such that it can inspect every request coming to the server. Should this now allow us to run MVC applications with extensionless URLS and have the aspnet isapi process them correctly without requiring the wildcard mapping (and avoid the performance penalties associated)? I havent found anything written about this yet, and havent had time to investigate. Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
ASP.NET 4.0 安装
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll
ISAPI 筛选器,以便将传入请求映射到新的 CLR,但此筛选器未注册作为通配符映射,但仅与已知扩展相关联。它不会拦截每个传入的请求。如果您想要无扩展名的网址,则需要执行 与 ASP.NET 2.0 的步骤相同,但使用新的 ISAPI 过滤器。ASP.NET 4.0 installs the
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll
ISAPI filter in order to map incoming request to the new CLR, but this filter is not registered as wildcard mapping but is associated only with known extensions. It does not intercept every incoming request. If you want to have extensionless urls you will need to perform the same steps as for ASP.NET 2.0 but use the new ISAPI filter instead.找到了答案:
链接
表明 asp.net 4.0 中存在启用无扩展 URL 的新功能。我需要对此进行更多研究以找出如何利用它。
基本上,它将 /eurl.axd/GUID 附加到每个路由请求,然后传递给 aspnet_isapi.dll 进行处理。此时 eurl.axd 将被删除。
我遇到的问题是我的 Ionics 重写器 IIRF 软件和新的 .net 重写器之间如何交互......它们有时似乎会相互干扰。
found the answer:
Link
appears that there are new features in asp.net 4.0 that enable extensionless urls. I need to do more research on this to find out how to utilize it.
Basically it appends /eurl.axd/GUID to each routed request, which then gets passed to aspnet_isapi.dll to be processed. the eurl.axd is then removed at this point.
The problems Im having is how these interact between my Ionics rewriter IIRF software and this new .net rewriting... they seem to be interfereing with each other at times.