WCF Services Hosting in ASP.NET MVC Web Application

I have an ASP.NET MVC 1.0 webapp that serves as an interface to our external API. In particular, it has a control panel for our clients API, documentation, etc.

Now I want to transfer our actual API (which is a set of WCF services) inside this project, so for example, http://api.example.com/controlpanel/dashboard will be served by the ASP.NET MVC runtime, wherease http://api.example.com/services/1.0/users.svc will be served using the appropriate WCF service.

Of course, this can be done by adding the virtual services/1.0 folder in IIS, but I really want these two parts to be inside the same project.

Is it even possible? If so, how do I integrate these two animals?

+6
asp.net-mvc wcf integration
source share
1 answer

Turning off MVC / WCF is not a problem. Services hosted in an MVC application are activated just fine (I think IIS bypasses the MVC environment for .svc requests).

The problem was more related to services in areas and requests for .svc files not passing through the route table.

I asked a more specific question regarding the actual problem here.

Expose area WCF services in an MVC application on a routed path

+5
source share

All Articles