【问题标题】:PageMethod and URL RewritePageMethod 和 URL 重写
【发布时间】:2011-06-07 12:10:45
【问题描述】:

我正在使用 URL Rewrite 放置一个完整的系统并使用 MapRoute。我的问题是 Ajax 调用是由 PageMethods 错误生成的,因为 URL 重写。好像没有找到 [WebMethod]。 有谁知道我该如何解决这个问题?

【问题讨论】:

    标签: .net url rewrite


    【解决方案1】:

    在 Application_BeginRequest (Global.asax) 中添加代码以检查 Context.Request.Path 中的文件扩展名 (.asmx /aspx)。并将其重写(Context.RewritePath)到在 url 映射中设置的那个。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-01-01
      • 2016-06-27
      • 2014-10-04
      • 1970-01-01
      • 2012-07-05
      • 2020-08-26
      • 2014-06-13
      • 2013-04-10
      相关资源
      最近更新 更多