代码之家  ›  专栏  ›  技术社区  ›  Chris Klepeis

ASP.Net MVC和Comet(WebSync)

  •  2
  • Chris Klepeis  · 技术社区  · 16 年前

    WebSync

    comet代码正在用[HttpPost]属性触发我的MVC控制器函数(即使页面没有刷新或显示为post)。有没有一种方法来确定什么是张贴和忽略我的路线 global.asax.cs

    • 请注意,我知道如何忽略MVC路由,这不是问题所在。
    2 回复  |  直到 16 年前
        1
  •  3
  •   Chris Klepeis    16 年前

    here

    它击中了我的一个MVC控制器函数。我不得不把这个添加到我的global.asax.cs

    routes.IgnoreRoute("{*allashx}", new {allashx=@".*\.ashx(/.*)?"}); 
    
        2
  •  1
  •   Anton    14 年前

    在WebSync 4中,您可以完全跳过.ashx处理程序,直接在Global.asax中为WebSync添加路由:

    WebSyncServer.AddRoute("...");