Questions tagged [owin]

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

owin
Filter by
Sorted by
Tagged with
0 votes
0 answers
22 views

Migrate Old ASP.NET Application using EF6 and OWIN to .NET Standard 2.0

We have an old ASP.NET application that uses EF6 and OWIN for authentication. We are currently looking to migrate it to .NET Standard 2.0 => that means we will need to replace EF6 with EF Core so ...
minhtuanta's user avatar
0 votes
0 answers
18 views

Identity Framework with multiple DbContext

I'm currently working on an existing API and handles registration and login using the Identity Framework. I am still new to Identity Framework and OWIN. Originally, the DbContext and ...
counterhash's user avatar
0 votes
0 answers
19 views

Deserializing AuthenticationTicket using OWIN TicketSerializer error when using DataProtection API

I'm using cookie authentication in ASP.NET webforms app. I need to implement a session store for AuthenticationTicket object but when I deserialize the ticket, I get an error Found invalid data while ...
Ronald Abellano's user avatar
0 votes
0 answers
17 views

How does it work using ASP.NET FormAuthentication

Our ASP.NET website is using FormAuthentication. After login success, it will add a cookie to client side. Here is the code. FormsAuthenticationTicket ticket = new FormsAuthenticationTicket(1, ...
Robin Sun's user avatar
  • 1,466
0 votes
1 answer
43 views

.NET 4.8 Owin OpenIdAuthentication: middleware not returning a 302 on full blown pages versus a test page

I am plugging in OpenID authentication to an old .NET Framework 4.8 web app. This is mostly working. As a test I have created a claims.aspx cloned from one of my existing pages, but almost all the ...
Sputnikk23's user avatar
0 votes
0 answers
14 views

Use Micosoft Owin authentication to login using MS Account belonging to an oranization as well as use local db credentials

We have an old ASP.NET MVC application that is running on .NET 4.6 using SQL Server with connectivity established through ADO.NET and for login using forms authentication by generating a ...
Pawan Rai's user avatar
0 votes
0 answers
24 views

integration openiddict identityServer .net core 7 with client .net framework 4.8

I have a identityServer with the following configuration written with .net core 7 builder.Services.AddDbContext<IdentityServerDbContext>(options => { options.UseSqlServer(builder....
milad shafiei's user avatar
0 votes
0 answers
134 views

How to use Microsoft Entra (Azure AD) with a .NET Framework Self-Hosted OWIN WebAPI

I have been trying to get a simple self-hosted OWIN WebAPI running from within a legacy Windows Service app. I got it to work without any issues until I tried adding Microsoft Entra ID authentication ...
Alex's user avatar
  • 297
0 votes
0 answers
12 views

Is there a method in / on OAuthAuthorizationServerProvider that is called every time the User hits the webserver?

I have an ASP.NET MVC OWIN website that uses a CustomOAuthProvider : OAuthAuthorizationServerProvider middleware in it's HTTP pipeline. That's interacting with an OAuth cookie to maintain the login ...
Brondahl's user avatar
  • 8,083
0 votes
0 answers
18 views

Why does adding app.UseWebApi() cause MVC routes to go through WebApi MessageHandler?

I am trying to integrate OpenIddict into a traditional ASP.NET app consisting of MVC as well as WebApi controllers. Access to MVC is authenticated via FormsAuthentication, WebApi is authenticated via ...
cajudosu's user avatar
0 votes
0 answers
33 views

Keycloak Logout is not working with Owin.Security.Keycloak

I'm integrating keycloak to a .net framework 4.7.2 MVC project. My Startup class is like this; public class Startup { const string persistentAuthType = "keycloak_auth"; private ...
Dumi's user avatar
  • 1,424
0 votes
0 answers
50 views

Owin Self-Hosted: SocketException (10054) An existing connection was forcibly closed by the remote

I have created a WinService (.NET Framework 4.7.2) where I am using OwinSelfHost to expose some WebAPIs (GET APIs protected via JWT) on localhost. From another application (in .NET 6), I am using ...
Andrea86's user avatar
  • 129
1 vote
0 answers
43 views

Angular and ASP.NET OWIN with Azure AD

I recently came across a challenging problem. I was asked to add Azure Active Directory (AAD) authentication to an Authentication server using ASP.NET OWIN .NET Framework 4.7.2. Basically I have an ...
Ajit Darnal's user avatar
0 votes
0 answers
39 views

OnSecurityTokenValidated method in OwinMiddleware is not getting called everytime

private Task OnSecurityTokenValidated(SecurityTokenValidatedNotification<OpenIdConnectMessage, OpenIdConnectAuthenticationOptions> notification) { Log.Info("Line:121 ...
Shrinivasan's user avatar
0 votes
0 answers
16 views

Enable Both Microsoft Authentication (OpenID) and Custom Username Password authentication in .Net Web App

I'm implementing both Custom Authentication (for External Users) and Microsoft Authentication (for Internal Users). This is a .net 4.7.2 framework webform project. I have added a startup.cs to the ...
Dumi's user avatar
  • 1,424
0 votes
1 answer
30 views

OWIN Facebook login throws JsonReaderException

I'm using the good old OWIN Facebook login for years now in an old .Net 4.8 MVC website. Since a few weeks it doesn't work anymore. The Google one is working fine. I enabled Katana logging and it ...
kloarubeek's user avatar
  • 2,786
0 votes
1 answer
40 views

The downloaded code from https://github.com/Azure-Samples/active-directory-b2c-dotnet-webapp-and-webapi does not build properly. Error for Nuget pckgs

I downloaded solution code from https://github.com/Azure-Samples/active-directory-b2c-dotnet-webapp-and-webapi. But when I try to rebuild it, I am getting errr for Owin NuGet package. ['Owin.1.0.1' is ...
Pradeep Thorat's user avatar
1 vote
0 answers
35 views

Trouble validating OpenIdConnectAuthentication setup for Azure AD integration in ASP.NET OWIN application

I'm working on an ASP.NET application using OWIN and trying to set up OpenID Connect authentication for integration with Azure AD. The goal is to connect via my Azure credentials to edit Microsoft ...
Ibrahim shaikh's user avatar
0 votes
0 answers
68 views

Migrate Authentication to Identity server with OWIN

I've run into a problem migrating the authentication system of two MVC websites using Framework 4.8. My two sites each had their own authentication system. I configured my two sites so that they could ...
Space's user avatar
  • 144
1 vote
0 answers
62 views

Owin OpenId connection with NET Framework - error IDX21323

I have a problemi with my .net Framework 7.4.2 Project. Now i'm using the project using ADFS connection using Owin+Identitymodel Packeges. I added the new autentication method using Owin openid to ...
Andrea Porcello's user avatar
0 votes
0 answers
33 views

No owin.Environment item was found in the context. After I add Hangfire Function and added <add key="owin:AutomaticAppStartup" value="false" />

I recently added Hangfire to my project and added <add key="owin:AutomaticAppStartup" value="false" /> to web.config , and OWIN stops working my startup.cs looks like this [...
Anthony Cheung's user avatar
0 votes
0 answers
10 views

Update OWIN context after start-up for multi-tenancy to add/update/remove SSO authentication providers

I need the ability to add/update/remove auth providers in the OWIN context (IAppBuilder?) after startup so clients can add/update SSO details and them be applied immediately without needing to restart ...
Vereonix's user avatar
  • 1,404
0 votes
0 answers
37 views

An .NET API; how to respond to large multi-form request without closing connection?

Consider this client request: var content = new MultipartFormDataContent(); var stream = new FileStream("c:\10GB.zip", FileMode.Open, FileAccess.Read); content.Add(new StreamContent(stream), ...
Jonas Rembratt's user avatar
0 votes
1 answer
305 views

Azure AD auth token refresh request blocked in iframe

We have a legacy Webforms application running on .NET framework 4.8 and recently updated to use Azure/Entra authentication. We used all of the code templates and articles provided by MS as the ...
n4esa's user avatar
  • 139
0 votes
0 answers
88 views

Windows authentication to Azure AD, and .NET 4.5 to 4.7. Error - the required anti-forgery cookie "__RequestVerificationToken" is not present

I have changed the authentication from Windows authentication to Azure AD on a legacy application and also upgraded .NET framework from 4.5 to 4.7. Code implementation can be found here How to ...
Developer's user avatar
  • 25.6k
1 vote
1 answer
739 views

How to integrate Azure AD Authentication in ASP.NET (on .NET 4.7) Web application using Owin without enablling Anonymouse Authentication in Project

I have integrated the Azure Authentication using Owin in ASP.NET web application running on .NET 4.7 with Visual Studio 2015 (it's a legacy application). To be able to connect to the Azure MS login ...
Developer's user avatar
  • 25.6k
0 votes
0 answers
24 views

Cookies shared between Office365 and my app

I've a webapp developed with ASP.NET MVC using Microsoft authentication (so handled with OWIN, OpenIdConnect). If the user in the browser is already logged in Office365 with his credentials, when ...
andreasperelli's user avatar
0 votes
0 answers
52 views

How to resolve the"The chunked cookie is incomplete" in ASP.NET application from Chrome and Edge browsers?

Our application started throwing the "Chunked cookie" exception and asked the user to clear cookies and cache which worked for a few days and again happened. Sometimes, this approach also ...
Vanapandi Narayanan's user avatar
0 votes
0 answers
30 views

How to use Microsoft.Owin.Hosting.WebApp inside a windows service?

I'm trying to do self-hosting API on .NET running as windows service. Microsoft documentation suggests that using OWIN is the most up-to-date approach. When we talk about Console Application, usage is ...
user2838376's user avatar
3 votes
2 answers
2k views

Able to use App Registration without client secret

I've been working through transitioning an old webforms app to use Azure AD authentication, everything is working fine however I noticed that although I added a client secret to the app registration, ...
n4esa's user avatar
  • 139
0 votes
1 answer
63 views

Random OWIN/OpenID behavior on ASP.NET 4.8 app startup - user sometimes is redirected to Azure automatically

Weird behavior. My application allows authentication via both internal accounts (using ASP.NET Identity) and Azure AD. The idea is that the login screen is shown and the user decides which way. But ...
gabpalves's user avatar
1 vote
0 answers
52 views

Postman websocket request using OWIN startup class

I have a webapp project that is in VB.net. I am trying to create aPostman Websocket request to connect my SignalR hub but I am not able to and I am getting 400 (Unexpected server response). Project is ...
Its_Ady's user avatar
  • 338
1 vote
1 answer
917 views

Azure AD Front-channel logout URL and SameSite cookie in ASP.NET

I've been investigating implementing Azure AD for an old web forms ASP.NET application and came across an issue when trying to use single sign out via the Front-channel logout URL in the App ...
n4esa's user avatar
  • 139
0 votes
1 answer
156 views

Support multiple authentication types, both IdentityServer and Jwt token

A central service has IdentityServer as the current authentication method which needs to stay intact. Now another Jwt bearer token needs to be supported. It seems possible to have the two token ...
Ville's user avatar
  • 119
1 vote
0 answers
25 views

Is a wildcard possible on redirect validation on a startup.cs file in ASP.NET MVC?

While performing OAuth I have to redirect URLs like for example https://*.abc.com/admin/oauth/authorize?client_id=e97d... (where * means it can be any dynamic word) and while trying the below code it'...
Ruchita 's user avatar
0 votes
1 answer
41 views

webapi.owinSelfHost: file download speed is slow

When using the webapi.owinSelfHost library to create a web server, the download speed of files from other computers through the server is very slow. Why is that? My network is 10GE, and the normal ...
zhongxiang qian's user avatar
0 votes
0 answers
37 views

.NET Framework 4.7 API v2 doesn't see call from Blazor server as authenticated

I feel like I'm really close to solving this, since I must be from mashing keystrokes for 4 days straight. :) Here's the env: Legacy .NET Framework 4.7 (app 1) has login form (Owin packages below) ...
Scott Ritshie's user avatar
0 votes
1 answer
48 views

Owin Web API. Set Autofac Lifetime Scope

I have a Windows Service created using Autofac as IoC and I want to add to this Windows Service an API using WebApi and Owin as Self-hosted API. I have been reading Autofac docs but I'm having a ...
JuanDYB's user avatar
  • 684
2 votes
1 answer
120 views

Using OWIN in an ASP.NET MVC application, why do I obtain a DbContext disposed (InvalidOperationException) randomly?

I know this question is too general for SO, and I would’t be surprised if it’ll be closed. Anyway, I try to post here my problem, being sorry if it doesn’t belong here. I’m working on an ASP.NET MVC ...
Pine Code's user avatar
  • 2,625
0 votes
1 answer
165 views

User getting frequently logged out using Sustainsys SAML and ASP.NET Session Cookies

I am facing a weird issue with one of our clients where users are getting logged out after few seconds(after placing 10-15 requests) of login. We are using following Sustainsys.Saml2.Owin 2.3.0 ...
kapd's user avatar
  • 649
0 votes
0 answers
132 views

OAUTH2 azuread authentication via UseOAuthBearerAuthentication

I have working middleware using deprecated Azure AD authentication. It looks like this. public partial class Startup { public void ConfigureAuth(IAppBuilder app) { ...
SeanK's user avatar
  • 15
0 votes
1 answer
137 views

OWIN redirect not hitting controller action

Trying to implement OWIN/Open ID (we tried MSAL but came up against some bugs) in an legacy MVC App - This is a mixed authentication app with forms auth as primary and Open ID as an option so all we'...
kaboom's user avatar
  • 13
0 votes
1 answer
51 views

How to pass a Value from OnRedirectToIdentityProvider to OnAuthenticationFailed in Owin startup

I have owin and OIDC none MVC .net application. I wonder if there is any way set a value (Like environment variable or parameter) in OnRedirectToIdentityProvider in Owin Startup and access it in ...
user464291's user avatar
0 votes
1 answer
188 views

How to get error reason from failed authentication using Microsoft.Owin?

I have the following code in Startup.Auth.cs : app.UseOpenIdConnectAuthentication( new OpenIdConnectAuthenticationOptions { ...
Notaras's user avatar
  • 657
0 votes
1 answer
56 views

retrieve the main request url in OnAuthenticationFailed in owin using environment variable or other method

I have an old .net application. I am implementing OIDC with Owin. This application is not MVC. Please note there is a third party app that does the authentication with IM tool Okt as single sign on. ...
user464291's user avatar
1 vote
0 answers
228 views

Azure AD B2C Authentication with OWIN in ASP.NET: Works on localhost but not on server [closed]

I am integrating Azure AD B2C authentication into my ASP.NET application using the OWIN middleware. I've set up the OWIN middleware for handling the B2C authentication as follows: app....
user1741975's user avatar
0 votes
1 answer
210 views

C# using Hangfire with Owin and TopShelf

I created a console application with TopShelf. Now I need to add Hangfire and Owin to activate the Hangfire dashboard. The problem is on my IAppBuilder instance that doesn't have any UseHangfire. I ...
erikscandola's user avatar
  • 2,876
0 votes
1 answer
1k views

Response status code does not indicate success: 404 (Not Found) with owin library

I am trying to implement the Azure AD authentication on my ASP.NET MVC application (framework version 4.7.2). All the required config values lie on the web.config file. AccountController.cs public ...
Ragesh Puthiyedath Raju's user avatar
0 votes
1 answer
55 views

C# roleprovider. getallroles() method is overriding Var userdetails= HttpContext.Current.GetOwinContext().Authentication.User.Claims;

I am using SSO in my login page and while authenticated by okta and receiving user claim details, the code is not working correctly, instead the control is taken next to existing role provider class. ...
Ruben rj's user avatar
0 votes
0 answers
174 views

ASP.NET web form project - Owin startup is not working on IIS

I have followed all the possible scenario to call owin startup, but still it does not work properly in IIS. In IIS pool is integrated pipeline and setup v4.0 CLR version In web.config, I added the ...
DevT's user avatar
  • 4,873

1
2 3 4 5
93