OWIN Middleware in the IIS integrated pipeline
Questions tagged [owin-middleware]
266 questions
0
votes
0 answers
Why does CallContext.LogicalGetData not return my object?
I want to access the IOwinContext through a provider I can inject into my controllers/services. To achieve that I am using a middleware that sets the context into the CallContext as:
public static IAppBuilder UseOwinContextInitializer(this…

Jules
- 7,148
- 6
- 26
- 50
0
votes
0 answers
How to pass returnUrl to Azure B2C using Owin Middleware
I'm using asp.net MVC with Owin middleware to integrate with Azure B2C using authorization code flow.
I need to somehow retain the returnUrl so that upon successful login, user is redirected to requested page per returnURL.
I've tried below but…

Nil Pun
- 17,035
- 39
- 172
- 294
0
votes
0 answers
I need to redirect to custom access denied page when a user access the site and authentication is failed I am using Owin authentication with MVC
When the user login with his e-mail and it is not registered on Azure AD then the custom error page should be redirected instead of static microsoft page. When the authentication is verified and the user is not in the my enterprise then the user…

sadiqshaik
- 11
- 5
0
votes
0 answers
Microsoft OWIN library don't extend session after an hour for a Webform application ? I have identified a solution that needs verification
I am using Microsoft OWIN library with the Webform App and my app faces timeout and redirects to ADFS around almost an hour. I already tried extending the app session through web.config
I also tried extending the owin…

Hassan Zahid
- 1
- 1
0
votes
0 answers
How to setup service in WCF that can be used anywhere within the request scope?
I have a wcf application where I would like to resolve a service (TenantService) and setup some values. And I would like that service values to be used anywhere I inject that interface. I already configured autofac and it's working great.
I've…

Ask
- 3,076
- 6
- 30
- 63
0
votes
0 answers
Owin Middleware Strange Formated Response
I've created an Owin middleware to log the response coming from other middlewares, but I can see the response in a strange format like
\u001f�\b
I think this is caused as the response headers includes
"Content-Encoding" : "gzip"
and the content…

Mohaned Mohamed
- 1
- 1
0
votes
0 answers
Using ADFS as the identity provider to authenticate an user from MS Office
I need help on using ADFS as the identity provider to authenticate an user from MS Office.
What I want to achieve is to be able to directly open the credentials page from the ADFS server in MS Office and authenticate the user. Please bear with me…

Paul
- 1,224
- 2
- 14
- 31
0
votes
0 answers
Can we register multiple owin middlewares using autofac?
I've 4 web apps (mvc 5, mvc 5, webapi) in my solution and requests from all of them need to go through the owin middleware. So I've created a middleware and registered it using autofac like the…

Ask
- 3,076
- 6
- 30
- 63
0
votes
1 answer
Getting error OWIN start.cs while web API hosting on prem IIS server and api having azure ad bearer authentication
I have implemented azure ad authentication in SPA app and validating the token using OWIN start.cs. it is working fine in local environment. below code used for token validation:
app.UseWindowsAzureActiveDirectoryBearerAuthentication(new…

manoj kumar
- 41
- 1
- 4
0
votes
1 answer
Microsoft Owin | Adding WWW-Authenticate in case of unauthorized
I am working on .net application. I can see that whenever https status code is 401, a www-authenticate header is appended with value Bearer.
I want change it so that it contain the authorization uri as follows
WWW-Authenticate: Bearer…

aman_41907
- 179
- 10
0
votes
0 answers
Why is there only one user getting a nonce issue? (IDX21323)
We're currently using Okta for SSO for our IIS web app and it seems to work fine 99% of the time. However, there is a single user that, when attempting to login, gets this exception about a missing nonce. I've tried reducing all of the variables as…

mrplainswalker
- 701
- 4
- 8
- 26
0
votes
0 answers
Is there any way that I can create my own middleware for an ASP.NET MVC websites?
I am trying to search for tutorials or blog posts on middleware for ASP.NET MVC 4 websites but I have found nothing. Any resources would be appreciated.
One of the main points that I would like to know about is how I can register the middleware in…

HopelessStudent
- 49
- 4
0
votes
1 answer
Why does MS Identity Platform callback with two redirect URIs one with 302 and one with 304?
I have created a MS Azure App Registration for an application that uses the MS Identity Platform. It works. I can login with my MS identities. Access tokens are created, and I can use them to access my API.
However, this is the case only when I run…

Rob Galante
- 21
- 4
0
votes
1 answer
Authenticated user is lost in web api owin middleware
I'm using owin middleware and Jwt Bearer Aurhentication alongside Autofac that help my Webapi to handle requests.
JwtBearerAuthentication middleware works fine and set HttpContext.Current.User.Identity.IsAuthenticated to true and it persist until…

Abolfazl
- 1,592
- 11
- 32
0
votes
0 answers
How to solve Microsoft.IdentityModel.Protocols.OpenIdConnect.OpenIdConnectProtocolInvalidNonceException: IDX21323: RequireNonce is '[PII is hidden]'?
I almost tried every solution so far for getting out of the problem of following exception.
Microsoft.IdentityModel.Protocols.OpenIdConnect.OpenIdConnectProtocolInvalidNonceException: IDX21323: RequireNonce is '[PII is hidden]'.…

Usman
- 2,742
- 4
- 44
- 82