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
2
votes
2 answers

OWIN Startup class is being executed along with WebAPIConfig.Register method

I am using Microsoft.Owin.Hosting in my one of integration test project to self-host the Web API in order to test end to end functionality. [TestMethod] public void GetLoanApplications() { using (WebApp.Start(url: url)) { …
Shaggy
  • 5,422
  • 28
  • 98
  • 163
2
votes
1 answer

How to return to pipeline root after branch executing?

In the OWIN pipeline, i use a branch to configure a custom authentication middleware. How to return to pipeline root after branch executing? app.Use(); app.Map("/branch", (application) => { …
Troopers
  • 5,127
  • 1
  • 37
  • 64
2
votes
0 answers

Autofact not respecting InstancePerRequest

I'm using Autofac on an MVC project with Web API. I'm registering all controllers: builder.RegisterControllers(assembly); builder.RegisterApiControllers(assembly); and DependencyResolver.SetResolver(new…
victor
  • 1,532
  • 1
  • 13
  • 32
2
votes
1 answer

"Failed to acquire token silently" error when trying to connect to Microsoft Graph

We have an asp.net MVC application that is authenticating against Azure AD with OpenID connect. Users are authenticated on startup with the following code: public void ConfigureAuth(IAppBuilder app) { ApplicationDbContext db = new…
2
votes
1 answer

Identity Server Response type not supported: code+id_token

I have an identity server 4 project as server, and asp.net mvc 5 as a client. everything is working fine except one occasional issue : Response type not supported: code+id_token During my investigation from production log, I found the authorization…
Michael Zhang
  • 21
  • 1
  • 3
2
votes
2 answers

How to add multiple actions to Swashbuckle Document Path pointing to one endpoint?

I try to describe my asp.net Web API OAuth endpoint in swagger using Swashbuckle 5.6.0 and tried this solution: How to show WebApi OAuth token endpoint in Swagger My problem is, that the URL of receiving an access token and getting a new one by…
Christian
  • 63
  • 9
2
votes
1 answer

How to stop extending cookie expiration time for ajax calls?

I set ExpireTimeSpan to one day ,but i have notification service in the UI that send ajax call each 5 minutes ,so the ajax call will extend the expiration time ,as result of that the system will not logout after period of time if the user is in…
2
votes
1 answer

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

I'm getting the error "system.net.httplistenerexception: access is denied" when running the following c# code on command line under Non-Admin account "Domain\test", but it works when running under admin elevated account "Domain\test"(e.g. Run as…
Eddy Peng
  • 21
  • 2
2
votes
0 answers

404 Error only when setting AllowInsecureHttp = false with Owin + JWT on SSL

I am receiving 404 error when deploying my Owin + WebApi to aws ec2 windows instance with SSL and AllowInsecureHttp = false, When I set it to true everything works fine for both http and https. But I don't want to allow http requests. The error only…
Bassel
  • 21
  • 4
2
votes
2 answers

How do I set OWIN keys like host.AppMode when running under IIS (Host.SystemWeb)?

In the OWIN pipeline of an application I'm refactoring, I've found the following code snippet: private bool IsDevelopment(IAppBuilder app) { const string appModeKey = "host.AppMode"; if (app.Properties.ContainsKey(appModeKey)) { …
Tomas Aschan
  • 58,548
  • 56
  • 243
  • 402
2
votes
1 answer

WebApi OWIN same token valid for two different instances of service

I have created WebApi selfhost service using OWIN library. Everything works great except some problem with authentication. I have started two instances of the service on the server and it came out that the token obtained from one service is valid…
raV720
  • 564
  • 3
  • 27
2
votes
1 answer

C# owin web api route index page

http://localhost:2000/api/{Controller} I need to create index page. URI : http://localhost:2000/api config.MapHttpAttributeRoutes(); config.Routes.MapHttpRoute( name: "api", routeTemplate: "api" ); And the api [RoutePrefix("api")] public class…
2222
  • 23
  • 7
2
votes
1 answer

jwt token, interop dotnet core and dotnet classic

Sadly, documentation on that stuff is hard to get by. I am a little in a bind in that I have a system which gets a new dotnetcore based API now but I can for now not replace the main system or the security handling it has. In the old system we…
TomTom
  • 61,059
  • 10
  • 88
  • 148
2
votes
0 answers

C# Web MVC + API - Owin Authentication, retrieve claims in website?

I have the following architecture: A website, that needs role control and user authentication. An API, that handle authentications via OWIN, by getting email/pwd and checking whether the user exists in the DB. If so, it creates a Claims and sends…
Ashallar
  • 990
  • 8
  • 15
2
votes
0 answers

High CPU Usage with ASP.NET

We've been recently experiencing a regularly occurring set of CPU spikes on our production server, specifically Tuesday evenings (and sometimes Monday nights), at 15-20 minute intervals (and sometimes less), So far we've narrowed it down to the…
1 2 3
99
100