Take the 2-minute tour ×

I'm doing some research in OWIN self-hosting for the company i work for. But the authentication part i can't get it to work and all the examples i can find are either unclear or written for ASP.NET while i am only allowed to use C#. What i want to do is have a list, xml file or database which one doesn't matter now, but i want to use one of the sources to create my own custom authentication for OWIN self-hosting without ASP.NET and MVC. The connection will be HTTPS and the client is HTML/JavaScript based. I was hoping someone can point me in the right direction or provide me with an example.

share|improve this question
It sounds like what you want to do is still a web application. But may I know why you don't want ASP.NET/MVC? Do they cause anything wrong? –  Johnny Feb 12 at 8:32
Currently the OWIN self-host who hosts the WepApi and the web application is written in C# and the person who's gonna build the web app has never worked with ASP.NET so if it's possible the company wants to use C# only. –  JackF Feb 12 at 8:36
@JackF Thats ridiculous, person who already has knowledge of C# can start writting WebApi following few basic examples, after all it's just C# code wrapped in HTTP verb methods. When you create empty WebApi project in VS you get controller with these methods and example how they work, you can just replace it with your types an have an WebApi... –  Unavailable Feb 12 at 8:48

1 Answer 1

up vote 5 down vote accepted

Just use the ASP.NET Identity framework and write your own provider. You will get all the great benefits like encryption for free. Without any effort. To lose all this good stuff just because somebody doesn't know ASP.NET is just not reasonable (imho). It has very little to do with ASP.NET because it is so loosely-coupled.

http://www.asp.net/identity gives you an idea of how to sit on top of OWIN.

Custom provider examples



And here is mine for Oracle databases, very simple to understand I would say. It should give you an idea on how to implement your own one:


share|improve this answer
gonna try this out will let you know if it works. –  JackF Feb 12 at 8:47
Great. Check back if you need any help. –  timmkrause Feb 12 at 8:50
This solved my problem marking it as solved –  JackF Feb 27 at 7:52

Your Answer


