Questions tagged [katana]

Katana is a collection of projects for supporting OWIN with various Microsoft components.

Katana is a collection of projects for supporting OWIN (http://owin.org) with various Microsoft components. Currently it includes OWIN support for System.Web, System.Net.HttpListener, and WebApi.

Also included is a Katana.exe for running self-host servers (like HttpListener) from the command line.


Useful links


Related tags

425 questions
34
votes
3 answers

Changing the response object from OWIN Middleware

My OWIN middleware is like this. (Framework is ASP.NET Web API). public class MyMiddleware : OwinMiddleware { public MyMiddleware(OwinMiddleware next) : base(next) { } public override async Task Invoke(OwinRequest request, OwinResponse…
33
votes
4 answers

How do I create a ClaimsIdentity object for Asp.NET MVC 5?

I am working in a .NET MVC 5 application. I do not want to use Entity Framework. I want to authenticate to a RavenDB database. It looks to me that I want to replace the UserManager that comes with the Account Controller. I think I can rewrite all…
28
votes
1 answer

In Web Api / Owin architecture, where are requests to '/token' handled?

I am trying to understand the Asp.net Web Api Individual Accounts authentication and authorization. I have see several tutorials on the web including this one. In short, when a user agent provides username and password the API issues a token that…
Joe
  • 619
  • 1
  • 8
  • 16
27
votes
4 answers

System.Net.HttpListenerException: Failed to listen on prefix 'http://localhost:8080

I am running the following code from Scott Allen's ASP.Net Fundamentals course using System; using Microsoft.Owin.Hosting; using Owin; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { …
Kirsten
  • 15,730
  • 41
  • 179
  • 318
27
votes
1 answer

How do you set katana-project to allow token requests in json format?

When I setup an OAuth Authorization Server in asp.net webapi 2 how can I set the token endpoint to accept json rather then a form encoded post? Using the sample http://www.asp.net/web-api/overview/security/individual-accounts-in-web-api I tried to…
Aaron Fischer
  • 20,853
  • 18
  • 75
  • 116
24
votes
1 answer

How can I safely intercept the Response stream in a custom Owin Middleware

I'm trying to write a simple OWIN Middleware, in order to intercept the response stream. What I'm trying to do is replace the original stream with custom Stream-based class, where I will be able to intercept writes to the response stream. However,…
Maxime Labelle
  • 3,609
  • 2
  • 27
  • 48
23
votes
5 answers

CORS is not working in web api with OWIN authentication

In my application i am using web api with token based authentication with CORS support, but when client request for the token, an error occured due to CORS (Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource…
Binson Eldhose
  • 993
  • 3
  • 14
  • 35
23
votes
3 answers

Alternative to use HttpContext in System.Web for Owin

ASP.NET authentication is now based on OWIN middleware that can be used on any OWIN-based host. ASP.NET Identity does not have any dependency on System.Web. I have an AuthorizeAttribute filter where I need to get the current user and add some…
Xavier Egea
  • 4,712
  • 3
  • 25
  • 39
21
votes
2 answers

OWIN app.use vs app.run vs app.map

What's the difference among app.use, app.run, app.map in Owin? When to use what? It's not straightforward when reading the documentation.
Bad
  • 4,967
  • 4
  • 34
  • 50
19
votes
3 answers

How do I enable Application Insights server telemetry on WebApi project that uses OWIN?

We are having a bunch of problems (read long response times) with a couple of projects in production and wanted to see exactly what was happening on the server. I then proceeded to add Application Insights to all of our projects by following this…
julealgon
  • 7,072
  • 3
  • 32
  • 77
19
votes
5 answers

GoogleOauth2 Issue Getting Internal Server 500 error

I decided to give the new Google Oauth2 middleware a try and it has pretty much broken everything. Here is my provider config from startup.auth.cs.. When turned on, all of the providers including the google provider get a 500 internal server on…
CrazyCoderz
  • 1,351
  • 1
  • 15
  • 30
18
votes
1 answer

OWIN Katana vs Node.js performance benchmark

Which is the reliable performance benchmark of OWIN Katana and Node.js? I am really interested in everything that has been tested and tried with Katana.
overthetop
  • 1,664
  • 2
  • 15
  • 25
18
votes
1 answer

Authentication with Microsoft.Owin.Testing.TestServer for In-Memory Integration Tests

I've just moved to using OWIN\Katana for a web api project. It uses Windows Authentication. This seems to be working, but most of my integration tests have broken. They were previously just using an In-Memory HttpServer but I've changed to using…
mutex
  • 7,536
  • 8
  • 45
  • 66
17
votes
5 answers

How to set default static web page for Katana/Owin self hosted app?

I've set up a web site using an Owin self hosted console app. I'm serving static files with no problem, the 'root' of the static part of the site works properly, and the web API routes work fine also. If I browse to: http://localhost/index.html it…
wilee
  • 601
  • 2
  • 6
  • 19
16
votes
2 answers

MVC 5 application - implement OAuth Authorization code flow

Based on this tutorial http://www.asp.net/aspnet/overview/owin-and-katana/owin-oauth-20-authorization-server, I have created an Authorization Server, a Resource Server and a MVC Client. The MVC Client has a Controller which gets some data from the…
MatthiasRamp
  • 531
  • 1
  • 4
  • 8
1
2
3
28 29