Reputation: 846
The problem is when I create the Startup class in my Console Project, after getting the newest Owin Self Host from NuGet (and changed my target platform to net45), it cannot resolve the HttpConfiguration class?
public class Startup
{
public void Configuration(IAppBuilder app)
{
var config = new HttpConfiguration();
config.Routes.MapHttpRoute("default", "{controller}");
app.UseWebApi(config);
}
}
What did I miss? It's the first time I try to play around with this Web API thing for my backend service, and without the configuration it's hard to get started with the WebAPI and OWIN. It's probably something simple that I missed?
Upvotes: 0
Views: 724
Reputation: 327
Basic things to check is that you have reference to System.Web.Http
assembly in your project and added using System.Web.Http;
statement.
Upvotes: 0