Questions tagged [owin]

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

Filter by
Sorted by
Tagged with
1 vote
0 answers
13 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
22 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
12 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
19 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
  • 590
0 votes
0 answers
12 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,496
0 votes
0 answers
31 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
  • 639
0 votes
0 answers
47 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
41 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
9 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
33 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
  • 607
0 votes
1 answer
23 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
67 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
41 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,854
0 votes
1 answer
110 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 P Raju's user avatar
0 votes
1 answer
13 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
73 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,843
0 votes
0 answers
35 views

Integrating the SSO for MVC3 application with AzureADB2C account

I have a MVC3 application, which has it's own authentication( when user providers username and password, it will redirect to landing page), Now the users are migrated to AzureB2C, so they have an ...
Sunny_'s user avatar
  • 1
1 vote
1 answer
57 views

How to implement OIDC in old webforms projects using C#

I have an old project which is C# and was written many years ago. We upgrade it to 2019 but the code is the same and is not changed and it is web form. It is not MVC. The project is consist if ...
user464291's user avatar
0 votes
1 answer
49 views

EPiServer OWIN - debugging 401 problems (role not recognized?)

Having some trouble identifying why I'm getting 401 errors despite having authenticated and having the valid roles. For context, I'm running: .NET 4.6.2 Episerver CMS11 and Commerce13 OWIN and ...
Kiran Ramaswamy's user avatar
0 votes
0 answers
72 views

ASP.NET Web API authorization has been denied for this request even is token has not expired

I'm facing an authentication issue abruptly. Even if the token is not expired, after some idle session(may be 30 minutes or so)authorization fails for requests on the page for API calls. This is my ...
Mashhoor Gulati's user avatar
0 votes
0 answers
69 views

How to integrate owin with classic asp project

I have updated classic asp project to .net 4.8 version without restructuring or any code changes and added owin integration for the same. but I am not able to set cookies for the project. I am ...
shweta's user avatar
  • 1
0 votes
0 answers
6 views

N2 CMS: Implementing Owin with OpenId connect authentication method. (FAILED)

Implementing Owin with OpenId connect authentication method within existing N2 CMS system. Before was using "FORMS" authentication. Forms authentication disabled. OpenId connect is working ...
Nikita's user avatar
  • 23
0 votes
0 answers
87 views

Trying to use MSAL - why is EnableTokenAcquisitionToCallDownstreamApi not available?

I have been scouring sites trying to find the solution, but clearly I am doing something simple because this appears to be unique. I am following some code - public static void ConfigureAuth(...
Matt McKnight's user avatar
0 votes
0 answers
16 views

Im getting an error on Google Login on Identity server

i have implemented the google login on my Identity Server 3, however, after the login process, im getting this error: [Error after logging][1] [1]: https://i.stack.imgur.com/RctcW.png My client id and ...
Mario Lada Martínez's user avatar
1 vote
0 answers
154 views

Okta auth stuck in infinite loop

I'm tasked to setup authentication by Okta. The auth code works on my dev computer, but it gets infinite loop on the staging server. The framework is asp.net webforms 4.8 Infinite loop: When I look ...
Cal's user avatar
  • 757
0 votes
0 answers
143 views

OpenID login authentication fails with 'access_denied' error

I have a problem when trying to login to a web site I'm working on. The issue occurs occationally with several users and since it doesn't happen every time it is hard to reproduce. The issue is solved ...
Fernando Álvarez's user avatar
1 vote
1 answer
56 views

How to send a client certificate from a .NET 5 site to an OwinRequest in a .NET 4.7.2 site via REST communication?

I'm trying to send a client certificate from a .NET 5 app using REST communication to a FW 4.7.2 app From .NET 5 application, I use HttpClientHandler adding client certificate from my storage of ...
rafagamero's user avatar
0 votes
0 answers
13 views

Problem oauth Google Login in Identity server 3 MVC

im currently working on incoroporate Google Login on Identity Server 3. Im using Microsoft.Owin.Security.Google but im struggling on what button do i have to put on my html to use google login. My ...
Mario Lada Martínez's user avatar
0 votes
0 answers
18 views

How can i bind same column in DbModelBuilder for IdentityUser's two different properties

This is my table SELECT TOP (1000) [Id] ,[Adi] ,[SoyAdi] ,[Maili] ,[Sifresi] ,[Adresi] ,[Telefonu] ,[KurumAdi] ,[VergiNo] ,[VergiDairesi] ,[...
Halil Kirişci's user avatar
-1 votes
1 answer
153 views

Adding Microsoft.Owin.Security reference to Visual Studio 2022

I am adding SSO verification to an existing C# desktop app and need to add a reference to Microsoft.Owin.Security but it doesn't appear on the reference list when I search for it. I installed the ...
roy_meir's user avatar
0 votes
1 answer
99 views

How can I set the ClientId and Authority dynamically for single sign on using OpenIdConnect?

We have multiple tenants, and they use different authorities (their own, not just standard providers). While I know how to dynamically set the clientId and secret, I can't figure out how to set the ...
Ezhumalai's user avatar
  • 163
0 votes
0 answers
164 views

How to configure OWIN OpenID Connect middleware to validate all token aspects without custom validators in .NET Framework 4.6.2?

I am using OWIN OpenID Connect middleware in a .NET Framework 4.6.2 project, and I want to validate all aspects of the ID tokens without writing custom validators for the issuer or the signing key. ...
HC HTI's user avatar
  • 1
0 votes
1 answer
68 views

Simple Injector creating instances of controllers on calling container.Verify()

I'm using Simple Injector with Owin Selfhosted, but I'm having a problem on calling container.Verify(). When I call container.Verify(), it is creating an instance of all my controllers, but in some of ...
Matheus Hoske's user avatar
0 votes
0 answers
22 views

Microsoft SSO does not work sometimes in asp.net owin

I am facing a weird bug in my asp.net application where even after successful authentication from Microsoft side I was not able to sign in my application.However this happens intermittently I have ...
Snake_Eyes's user avatar
0 votes
0 answers
53 views

OWIN self-host ASP.NET Web API does not receive cancellation token

As the title says I tried sample from Microsoft site https://learn.microsoft.com/en-us/aspnet/web-api/overview/hosting-aspnet-web-api/use-owin-to-self-host-web-api but I'm unable to get cancellation ...
cloudburst's user avatar
0 votes
1 answer
155 views

How to persist additional claims and tokens from external providers in ASP.NET MVC 5

I have an app that is written on the top of an old ASP.NET MVC 5 framework using C#. I want to enable OpenIdConnect authentication to allow my users to authenticate using a private OpenId server. I ...
Jay's user avatar
  • 1,168
0 votes
0 answers
39 views

how to auto register users after valid OpenIdConnect authentication is ASP.NET MVC 5 app?

I have an app that is written on the top of an old ASP.NET MVC 5 framework using C#. I want to enable OpenIdConnect authentication to allow my users to authenticate using a private OpenId server. I ...
Jay's user avatar
  • 1,168
0 votes
0 answers
138 views

how Keycloak logout can be done in ASP.NET MVC (.Net Framework 4.5)

integrated Keycloak with my .Net Framework 4.5 MVC projects. Since there is no direct Keycloak client for .Net, I'm using the "Owin.Security.Keycloak-3" NuGet for this. I can login from ...
Rakesh P Sukumaran's user avatar
1 vote
0 answers
158 views

Microsoft Owin Hosting only accessible from localhost - from public ip not accessible

I'm using aws Windows Server 2022 Datacenter build 21H2. trying to host owin with webapi. My pc os is windows 10 .net framework 4.8 webapi only reachable from localhost:port/endpoint. Not able to ...
Venkat B's user avatar
1 vote
0 answers
83 views

Autofac Integration with self hosted Owin server returns 404 for all WebApi controllers with dependencies

Overview We have a solution that we are switching from ninject to autofac for DI. We have a console application (.net 4.8) that starts two separate processes for testing locally. It starts an owin web ...
DanCaveman's user avatar
0 votes
1 answer
231 views

W3C TraceId Propagation in ASP.NET MVC 4/5/6

I have some old applications on ASP.NET MVC 5 and 6, and I want to accomplish something like the automatic W3C trace ID propagation that ASP.NET Core does. (E.g., reading the incoming traceparent ...
iinuwa's user avatar
  • 454
0 votes
1 answer
309 views

How to handle multiple single tenant app registrations in Azure AD in OWIN

My problem is as follows: We have customers who want to login to our app using Azure AD (Microsoft work accounts). Due to organizational issues, it is impossible to set our tenant to act as a hub, ...
Valium's user avatar
  • 29
0 votes
0 answers
11 views

How to specify a role to access all Web APIs on a global level using Owin Tokens

Right now I have APIs with Authorize attribute decorators specifying roles. [Authorize(Roles = "User, Admin")] public IHttpActionResult getResources() { ... } [Authorize(Roles = "Admin&...
Basel H. Ashour's user avatar
0 votes
0 answers
77 views

Login Not Working in Visual Studio 2022 with ASP Identity

I have a user in the database table AspNetUsers. This user can log into my application that is deplopyed on Azure with no issues. When I take that same account and try to login using Visual Studio ...
PhillipPDX's user avatar
0 votes
0 answers
74 views

How to use MQTTnet WebSocket with selfhosted OWIN API Controller?

I need to build an MQTTnet Broker/Server, that is spoken to through a website on e.g. wss://host.domain.tld/mqtt. This is already working in .NET Core, like this: app.UseEndpoints(endpoints => ...
Leona Ellis's user avatar
0 votes
0 answers
25 views

Modify existing ASP.NET MVC 4.x framework with local sql server membership role based schema to use Oauth2.0

I have an old ASP.NET MVC 4.x framework (c#) webapp that uses sql server membership users and roles. It has the SQL server schema that with the table dbo.AspNetUsers table instead dbo.aspnet_Users. ...
Alan Montaño's user avatar
0 votes
0 answers
15 views

Caching with Owin WebAPI

Can I please have an example of caching with Owin Webapi? I tried to use CacheCow but there is no example for Owin Webapi. Thank you. sample code of caching using Owin Webapi.
frans's user avatar
  • 1
0 votes
1 answer
63 views

OWIN self hosted web API doesn't receive connections from different network

This is not a duplicated question, I searched all the similar questions and they are similar but not the same issue. I have OWIN self-hosted ASP.NET Web API in a windows service, I can access the API ...
Elamir Ohana's user avatar
0 votes
0 answers
97 views

Customizing ASP.NET Identity OWIN pipeline

I'm implementing SSO in ASP.NET MVC 5, .NET 4.8. I am, of course, using Microsoft.AspNet.Identity for this, which in turn relies on OWIN middleware. The OWIN pipeline is set up in Startup class, and ...
dzenesiz's user avatar
  • 1,388
0 votes
0 answers
121 views

Azure Active Directory Authentication not working when UseCookieAuthentication receive not null CookieAuthenticationOptions

I'm trying to include AAD authentication to an asp.net framework 4.5.2 app which Im developing. I download the AppModelv2-WebApp-OpenIDConnect-DotNet-master and configure my app registration on Azure, ...
Ming Ye's user avatar
  • 13

1
2 3 4 5
93