I've got a WCF service (lets say TestService.svc
sitting inside the services
directory of an Area in an MVC app. This area is combined into the main app. The area is called content
.
The routes have been setup and the area works fine. To access the Index
action on the Home
controller I can do either:
http://my-host/areas/content/index/home
or
http://my-host/content/index/home
The SVC file however can only be accessed via:
http://my-host/areas/content/services/TestService.svc
The URL must include the areas
directory, I can't access it directly via http://my-host/content/services/TestService.svc
. If I try I am given an error 404.
Is there a way to setup the application so that it routes the SVC request through the same route table as the controllers? I don't want to have to use areas
for the services.