mardi 27 octobre 2015

.Net Web API and OWIN

So i wanted to quickly try setting up a web api in Visual Studion 2013. Created Web API project (fine). Set reference through EF to my backend DB (ok)

Then read about something called 6.x DbContext Generator where it says you should be using it. 2 Hours later still not sure what this Generator does. But worked out I had to delete a few tt files before it would run on existing edmx page.

So now all ready right ?

Run up project and get the OWIN error. The following errors occurred while attempting to load the app. - No assembly found containing an OwinStartupAttribute. - No assembly found containing a Startup or [AssemblyName].Startup class. To disable OWIN startup discovery, add the appSetting owin:AutomaticAppStartup with a value of "false" in your web.config.

Never heard of OWIN till then. Don't know what it is why it needs to be there. However, the instruction to disable OWIN by placing a key int he config file (both as there are two in a web API) has no affect.

Then I read that I should be using MVC 6.0 which has no web api and some different form of OWIN. But its not here yet.

So my question is. If i want to set up a web api quickl, how should i go about doing this so I can get past all these issues ?




Aucun commentaire:

Enregistrer un commentaire