Questions tagged [owin]

Open Web Interface for .NET that describes how components in a HTTP pipeline should communicate.

OWIN defines a standard interface between .NET web servers and web applications, which describes how components in a HTTP pipeline should communicate. The goal of the OWIN interface is to decouple server and application, encourage the development of simple modules for .NET web development, and, by being an open standard, stimulate the open source ecosystem of .NET web development tools.


Useful links


Related tags

4634 questions
55
votes
3 answers

What is the new Startup.cs file for in Visual Studio 2013 projects?

I have just installed Visual Studio 2013, created an MVC Web Application project and noticed a new file in the project template called Startup.cs. What is this, how is this different from Global.asax.cs and are there any good best practices on what…
Mark Redman
  • 24,079
  • 20
  • 92
  • 147
54
votes
3 answers

What is the purpose of the extension method CreatePerOwinContext in OWIN implementation by Microsoft

I am a newbie in ASP.NET, and currently learning ASP.NET Identity. I know it's built on top of OWIN implementation by Microsoft, and I am also still learning that too. So, I came across the extension method CreatePerOwinContext in the Owin startup…
Next Developer
  • 1,249
  • 1
  • 10
  • 20
52
votes
3 answers

IHttpActionResult and helper methods in ASP.NET Core

I'm trying to move my web api 2 project to ASP.NET 5. But I have many elements that are not present anymore. For example IHttpActionResult or Ok(), NotFound() methods. Or RoutePrefix[] Should I change every IHttpActionResult with IActionResult ?…
Tim
  • 1,749
  • 3
  • 24
  • 48
52
votes
1 answer

UseOAuthBearerTokens vs UseOAuthBearerAuthentication

In our Startup class, I have configured the following auth server options: OAuthAuthorizationServerOptions OAuthServerOptions = new OAuthAuthorizationServerOptions() { AllowInsecureHttp = true, TokenEndpointPath = new…
Dave New
  • 38,496
  • 59
  • 215
  • 394
52
votes
2 answers

UseCookieAuthentication vs. UseExternalSignInCookie

I use Owin to authorize through Google oAuth. Here is how my cookies are configured: // Enable the application to use a cookie to store information for the signed in user app.UseCookieAuthentication(new CookieAuthenticationOptions { …
SiberianGuy
  • 24,674
  • 56
  • 152
  • 266
52
votes
3 answers

Running self-hosted OWIN Web API under non-admin account

Is it possible for a self-hosted OWIN Web API to run under a non-administrator account? I have already tried dozens of url reservations and nothing works. The service fails to start with "Access is denied". It works when the account is added to…
Colin Superdog
  • 744
  • 1
  • 5
  • 10
52
votes
6 answers

Context.User.Identity.Name is null with SignalR 2.X.X. How to fix it?

This is driving me insane. I'm using latest signalR release (2.0.2). This is my hub code (OnConnected) public override Task OnConnected() { //User is null then Identity and Name too. …
MRFerocius
  • 5,509
  • 7
  • 39
  • 47
51
votes
16 answers

Why is [Owin] throwing a null exception on new project?

I have a rather strange issue i'm not sure how to fix or if i can even fix it. I've done some research into the issue but can't find an answer to what's causing it. I'm following a rather simple guide at…
micah hawman
  • 519
  • 1
  • 4
  • 3
50
votes
2 answers

Hw to pass arguments to my own Startup class?

I'm trying to develop a web api self hosting app using OWIN. In my own XyzStartup class, I need an external argument: contentFolderPath. However, I didn't find a way to pass this argument. Here is my code below: var contentFolderPath =…
Zach
  • 5,715
  • 12
  • 47
  • 62
49
votes
1 answer

How do you login/authenticate a user with Asp.Net MVC5 RTM bits using AspNet.Identity?

I have been working on a web application using MVC5, EF6, and VS 2013. I spent some time upgrading to the RC bits once released. Thanks to all the great posts out there: eg. Decoupling Microsoft.AspNet.Identity.* and Updating asp.net MVC from…
ACG
  • 750
  • 2
  • 6
  • 16
48
votes
6 answers

Hosting WebAPI using OWIN in a windows service

I've self-hosted Web API using OWIN (inside a windows service). From what I understand, this is enough to make HTTP requests come to the windows service. I'm able to hit the WebAPI URL (http://localhost/users) locally (from the same machine), but…
Narayana
  • 2,654
  • 3
  • 32
  • 32
48
votes
5 answers

ASP.NET (OWIN) Identity: How to get UserID from a Web API controller?

(Using VS2013 RTW, ASP.NET MVC5) I've seen lots of documentation on how to add properties to the ApplicationUser class (and table) when using ASP.NET identity. But I haven't seen any documentation on how to have a separate table with content that…
47
votes
2 answers

What is the relationship between owin and oAuth2.0?

I study external login strategies and the terminology confuses me. What's the relation between the following. Owin OauthWebSecurity OAuth 2.0 Owin Katana ASP.NET Identity
cnz81
  • 694
  • 1
  • 6
  • 15
47
votes
8 answers

MVC 5 How to define Owin LoginPath with localized routes

I have a MVC 5 website with localized routes defined as routes.MapRoute( name: "Default", url: "{culture}/{controller}/{action}/{id}", defaults: new { culture = CultureHelper.GetDefaultCulture(), controller =…
s0nica
  • 1,307
  • 1
  • 15
  • 17
46
votes
3 answers

Translate ninject ISecureDataFormat binding to Autofac

I am migrating a large codebase from Ninject to Autofac and am struggling on one of the bindings that I believe is causing an activation error based on some of my debugging. Ninject: Bind>() …
O'Mutt
  • 1,557
  • 1
  • 13
  • 27