本文介绍了使IIS 7.5 *通的.xml请求asp的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
HTTP处理程序和HTTP模块概述 如何:注册HTTP处理程序 HTTP Handlers and HTTP Modules Overview
How to: Register HTTP Handlers
如何配置IIS 7.5的所有* .xml文件请求转发到asp引擎,所以我可以在Global.asax中处理它们和路径改写为* .aspx文件?现在IIS期望直接找到他们在磁盘上。我会用这个做动态生成的sitemap.xml我
解决方案您可以通过编辑你的web.config强制静态文件要经过ASP.NET管道:
< system.webServer> <&处理GT; <添加名称=XMLHandlerTYPE =System.Web.StaticFileHandler路径=* XML。动词=GET/> < /处理器>< /system.webServer>How do I configure IIS 7.5 to forward all *.xml file requests to asp engines so i can handle them in Global.asax and rewrite the path to a *.aspx file? Now IIS is expecting to find them directly on disk. I will use this do dynamically generate my sitemap.xml
解决方案You can force static files to go through the ASP.NET pipeline by editing your web.config:
<system.webServer> <handlers> <add name="XMLHandler" type="System.Web.StaticFileHandler" path="*.xml" verb="GET" /> </handlers> </system.webServer>
更多推荐
使IIS 7.5 *通的.xml请求asp.net
发布评论