OWIN Middleware in the IIS integrated pipeline
Questions tagged [owin-middleware]
266 questions
0
votes
1 answer
Nullreference exception with owin cokies ASP.NET MVC 5
I have a problem with owin cokies. We have a site powered by ASP.net MVC 5. And authorization is by owin middleware. Sometimes users get a white screen with 500 error. I cant reproduce it at local but a couple of times i could reproduce this case at…

Alex Grigorenko
- 403
- 4
- 12
0
votes
1 answer
Implemented Oauth to generate token but how to validate that user has access rights are not for specific method?
I have implemented following code to generate refresh token which i saved into database for future use.
public class SimpleRefreshTokenProvider : IAuthenticationTokenProvider
{
public async Task CreateAsync(AuthenticationTokenCreateContext…

Neo
- 15,491
- 59
- 215
- 405
0
votes
1 answer
Okta OpenID Connect - OWIN Static File Middleware SPA
I have an Angular (2.x) Spa application that utilizes webapi calls from the backend. The assets for the Spa are hosted via Owin static file middleware not an MVC controller returning a view. I am trying to integrate with Okta for SSO utilizing…

Shawn
- 869
- 1
- 9
- 27
0
votes
1 answer
IdentityServer3: OWIN Katana middleware is throwing "invalid_client" error as it cannot get a token
We are using IdentityServer3 as the identity provider and OWIN Katana middleware to do the handshake based on OpenId Connect. The authentication works fine as we were redirected to identity server and back to the originating website. But the issue…

TejSoft
- 3,213
- 6
- 34
- 58
0
votes
1 answer
Use pipeline stage marker for autofac middleware
I register a per-request lifetime middleware (it has some dependecies) in autofac
builder.RegisterType().InstancePerRequest();
Then I register all autofac middleware at startup.cs
…

Bagdan Gilevich
- 1,231
- 1
- 11
- 17
0
votes
1 answer
OWIN - clear invalid WSFederation cookies
I implemented an ASP.Net Web API 2 project with ADFS cookie authentication and hosted it on IIS. All works fine.
However, some clients have got old cookies which became invalid because of configuration changes. Such cookies cause following error…

stop-cran
- 4,229
- 2
- 30
- 47
0
votes
2 answers
WebAPI 2.2 on .Net core with IdentityServer3.AccessTokenValidation throws NullreferenceException
I'm having a hard time getting this to work. Currently I already have got an IdentityServer4, an Angular2SPA and a WebAPI 2.2 for ODATA running. All services are running in individual projects on asp.net core.
IdentityServer4
Angular2SPA
WebAPI2.2…

Nurfed
- 139
- 3
- 13
0
votes
1 answer
OWIN, Core and B2C - Multiple identities
I'm trying to have a user sign in with local account and then sign up with a social account so that I can link the two together in my own database. That way, later they could use B2C and login with either local or social providers and end up with…

Bill Noel
- 1,120
- 9
- 21
0
votes
0 answers
ASP.NET Web API - Handling media file authorization
I have a mobile app with talks to backed api implemented in asp.net web api. User can post pictures from app, which I am saving in my content directory. Now user can also request the same url from app and its served to user directly from IIS.
What i…

paresh.bijvani
- 233
- 1
- 4
- 12
0
votes
1 answer
How are users authenticated and retrieved?
Having worked my way through this tutorial:
http://bitoftech.net/2015/02/16/implement-oauth-json-web-tokens-authentication-in-asp-net-web-api-and-identity-2/
I now have the solution standing upright and I can issue JWT tokens (what I think of as…

Matt W
- 11,753
- 25
- 118
- 215
0
votes
1 answer
Owin Middleware not modifying response status using Test Server
I'm writing a unit test using Owin Test Server, but it is not behaving as I expect it to. I can't figure out what I'm doing wrong. I expect the status code to have been modified, as I'm doing in the last step of the owin pipeline, but it is not…

Asif Shiraz
- 864
- 1
- 12
- 27
0
votes
1 answer
NUnit Test cases skipping owin middleware
I have an OAuthServerProvider issuing tokens after authenticating username and passwords. When the username or password is invalid I reject the owin Context, which will by default return 400 Bad Request as the status code.
But I want to respond…

Giridhar Karnik
- 2,213
- 4
- 27
- 47
0
votes
1 answer
Where to handle app initialization in SSO situation?
I have App1 and App2, doing SSO using IdentityServer3 with Active Directory.
Each app has its own users and roles. I created a ClaimsTransformation OWIN middleware, get user/roles, serialize into cookie, then bring back on subsequent calls. That…

Whoever
- 1,295
- 1
- 14
- 21
0
votes
2 answers
Authentication cookie not being read when using [Authorize] attribute
I need help configuring my asp.net application using cookie authentication. This is what my configuration looks like:
public void ConfigureAuth(IAppBuilder app)
{
app.CreatePerOwinContext(ApplicationDbContext.Create);
…

Draco
- 16,156
- 23
- 77
- 92
0
votes
1 answer
How to read ASP.NET Session on IdentityServer3? OWIN Pipeline Order is broken
Problem: I'm trying to use ASP.NET Session on IdentityServer3 Controllers, but I just can't make it work.
I found this similar question that explains how to enable session on OWIN middleware, and it worked perfectly: I created some controllers…

drizin
- 1,737
- 1
- 18
- 44