开发者

ASMX operation 404s, but ASMX service description doesn't, url routing issue?

So I've found myself with a conundrum. We have some old asmx web services in our app that have worked fine for ages.

All of the sudden they stopped working on the build server (CI). I say stopped working, because even though the service description displays when I navigate to the service, invoking any operation doesn't get routed to the service (Web Form Routing). There are 2 strange issues that arose in my attempt to fix this problem.

1.) After shelving all my pending changes, grabbing latest from TFS, and doing a local build (which unless I'm mistaken, will get me what is on the build开发者_如何学运维 server since we build/push with each check in). I noticed that I can't duplicate the error locally.

2.) Even though I can't duplicate the error locally, I still suspect routes, however the routes for all our services are added to the table first, and look like this : "{service}.asmx/{*pathInfo}", I guess this was added as a safety precaution as something like MyService.svc shouldn't even make it to the router, as the file actually exists, though I'm not sure if that rule applies for MyService.svc/MyMethod

I'm not really sure how to test routing, i.e. where to set a break point to know if I'm going through the route table for a particular request or not, so any pointers in that area would be appreciated, as well as any other ideas as to why this might be happening.

Thanks!


I've just encountered the same error, after stumbling over this SO entry:

Handlers returns 404 error on IIS7.5 integrated pipeline

and tried the solution of adding the asmx handler to the web.configs webServer section all was well:


  <system.webServer>
    <validation validateIntegratedModeConfiguration="false"/>
    <modules runAllManagedModulesForAllRequests="true"/>
    <handlers>
      <add verb="*" path="*.asmx" name="asmx" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
    </handlers>
  </system.webServer>


0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜