使IIS 7.5 *通的.xml请求asp.net

编程入门 行业动态 更新时间:2024-10-27 06:20:36
本文介绍了使IIS 7.5 *通的.xml请求asp的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

如何配置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>

  • HTTP处理程序和HTTP模块概述
  • 如何:注册HTTP处理程序
  • 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>

  • HTTP Handlers and HTTP Modules Overview
  • How to: Register HTTP Handlers
  • 更多推荐

    使IIS 7.5 *通的.xml请求asp.net

    本文发布于:2023-11-12 04:49:47,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1580551.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:IIS   xml   net   asp

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!