2
votes

I'm struggling getting a project setup to host only web api an owin. The goal is to deploy to IIS.

I've tried the following: http://www.asp.net/aspnet/overview/owin-and-katana/getting-started-with-owin-and-katana

https://dotnetcodr.com/2015/07/06/building-a-web-api-2-project-from-scratch-using-owinkatana-net-part-2-owin-host/

In the end, I'm not finding things that work. Plus I'm not understanding what is actually needed. For example, I did much of the following on https://github.com/danesparza/OWIN-WebAPI-Service

  1. Install-Package Microsoft.AspNet.WebApi.OwinSelfHost
  2. Created the StartUp.cs file
  3. Added the assembly attribute pointing to the startup file within the startup file
  4. Added the valuescontroller for a simple test.

I did not create APIServiceTest which is extended from ServiceBase.

The template for WebApi2 sucks. It always includes MVC. I'd just really like to understand what's need for owin and webapi 2.x

Can anyone help me or point me to something that works within visual studio 2015?

As always, thank you! Kelly

1

1 Answers

0
votes

Have you tried this tutorial?

http://bitoftech.net/2014/06/01/token-based-authentication-asp-net-web-api-2-owin-asp-net-identity/

It´s very well explained I recently followed it and lead to absolute success.

Also, you can download its codebase here:

https://github.com/tjoudeh/AngularJSAuthentication