Can't get WCF Data Service running in DASP (or even the untouched tutorial WCF)

Discussion in 'ASP.NET WebServices' started by Tarks, Nov 25, 2010.

  1. I've spent yesterday and today trying to get a WCF 4 Data Service running, I've followed several tutorials, including

    http://community.discountasp.net/showthread.php?p=36752#post36752

    I even grabbed the example project from

    http://community.discountasp.net/showthread.php?t=7719

    and ftp'ed the site to host, but it fails.

    I can get past the "This collection already contains an address with scheme http" error by correcting my web.config, but after that I'm left with it telling me "the resource cannot be found".

    It's not really worth posting my web.config etc as the sections mirror what's in those tutorials.

    Any help would be appreciated.
     
  2. (Can't edit org post)

    I've found that this seems to be something to do with hosting MVC and an .svc. . . I can get it to work in a regular asp.net project, but I still get a 404 in an MVC project.
     
  3. Bruce

    Bruce DiscountASP.NET Staff

    Can you post the url to the page?
     
  4. Found the issue, not sure why but it seems that when hosted under circumstances (that DASP fills) it routes files that exist through its default catch-all route. To fix this I've used the following which ignores any svc file and routes to it as normal (no matter if it's toplevel or in a directory)

    IgnoreRoute("{*allsvc}", new { allsvc = @".*\.svc(/.*)?" });
     
  5. Bruce

    Bruce DiscountASP.NET Staff

    thank you for posting the resolution.
     

Share This Page