Cragly
Cragly

Reputation: 3616

WCF Web API Host Project Type

I am used to creating traditional WCF services and hosting them in IIS. I do this by creating a WCF Service Application within Visual Studio.

For my next project I want to leverage the functionality found in the new WCF Web API. However I am not sure what type of project I need to create to host the service.

Nearly all the examples I have read/seen show the service hosted in a ASP.NET Empty Web Application. Is this correct? Can I not host in in a WCF Application project and add the Web API references in that from NuGet?

I did try hosting in a WCF Application but soon fell over when it came to routing and the MapServiceRoute call in the Global.asax file which gets called on Application_Start.

Any help on this would be much appreciated.

Upvotes: 1

Views: 431

Answers (1)

Paulo Santos
Paulo Santos

Reputation: 11567

For what I gathered from the samples, you can create the WCF as you have been creating, that is, a WCF Service Application in the WEB folder of Visual Studio.

Upvotes: 1

Related Questions