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
10
votes
1 answer

Combining route mappings in WebApi

I am using routing in my WebApi Katana application. I have the following two route mappings that work fine. My question is, can I combine these into a single route mapping using optional parameters? I can’t see an obvious way to do it and keep the…
Retrocoder
  • 4,483
  • 11
  • 46
  • 72
10
votes
1 answer

How to Configure owin/Katana to listen on all host ip addresses

How to configure an owin web server to be accessible from other hosts. All the examples are configured for localhost. I might not know what is the URL. (ip address/host name) Code: class Program { static string url = "http://localhost:9080"; …
cosmaioan
  • 135
  • 1
  • 6
10
votes
2 answers

OWIN/Katana & BasicAuthentication

I am trying to achieve a simple task: Secure my ASP.NET WEBAPI (built on top of Katana) with BASIC Auth. I know I could implement my own middleware or message handler or whatever. However I'm wondering if such a simple task is not already…
LaurinSt
  • 952
  • 11
  • 25
9
votes
1 answer

OAuthBearerAuthenticationMiddleware - Server cannot append header after HTTP headers have been sent

I've been trying to plug some OWIN middleware into an existing WebApi project. My start-up originally contained only the following…
Sam Shiles
  • 10,529
  • 9
  • 60
  • 72
9
votes
1 answer

Web Api 2 HttpContext or HttpActionContext

What is the difference between the following two ways of accessing the principle via an AuthorizeAttribute implementation? Using HttpContext: protected override bool IsAuthorized(HttpActionContext actionContext) { return…
Dave New
  • 38,496
  • 59
  • 215
  • 394
9
votes
2 answers

Owin self-host - Failed to listen on prefix 'http://localhost:12345/' because it conflicts with an existing registration on the machine

I'm trying to self-host a simple WebAPI: public class AccountViewApplication { protected IDisposable WebApplication; public void Start() { WebApplication = WebApp.Start("http://myhost.mymachine.me:12345"); new…
Eugene Goldberg
  • 14,286
  • 20
  • 94
  • 167
9
votes
3 answers

Microsoft.Owin.StaticFiles works in console host but I get a 404 in IIS on file requests

I have Microsoft.Owin.FileServer (v2.1.0) set up in my Owin pipeline, and setting up FileServerOptions with EnableDirectoryBrowsing = true works great for showing the directory contents in both my console host and iisexpress. It's when I try to view…
Trey Mack
  • 4,215
  • 2
  • 25
  • 31
9
votes
1 answer

Oauth authentication with owin & Nancy

Following this guide for external auth using MVC 5 on Owin - External login providers with owinkatana. I have added the following to my Owin Nancy application Startup.cs…
Ned Ryerson
  • 379
  • 2
  • 10
9
votes
2 answers

Unable to run an asp.net 4.5 app on xsp on Mono 3

I've build Mono 3.0.2 from source (tarball), and built XSP from both the latest tarball and the latest on Github, but I'm unable to run a relatively simple asp.net app using .net 4.5 because it sees 'targetFramework="4.5"' in the web.config as…
Steven Robbins
  • 26,441
  • 7
  • 76
  • 90
8
votes
3 answers

IdentityServer3: Some Claims not being returned from identity server

Context: I am using ASP.NET MVC with OWIN self host. Below are the rest of the configs/setup. In my Clients in identity server (notice the AllowedScopes set): public static class InMemoryClientSource { public static List
jerbersoft
  • 4,344
  • 9
  • 42
  • 48
8
votes
2 answers

Session variable equivalent in OWIN self-host

I have a sample web API hosted in an OWIN process (self hosted, not in IIS). I get a JWT token in my controller and I want to be able to retreive it in another part of the application, a class that implements NserviceBus…
Patrice Cote
  • 3,572
  • 12
  • 43
  • 72
8
votes
1 answer

How to unit test code that uses OWIN Cookie Authenthication

I have learned that OWIN has this great Microsoft.Owin.Testing library that lets you test your web application in-memory. However, my site requires authentication before accessing resources which has complicated writing test code. Is there a…
vossad01
  • 11,552
  • 8
  • 56
  • 109
8
votes
2 answers

Authentication / Authorization MVC 5 and Web API - Katana/Owin

I'm having problems trying to decide on a route to take on a project I have. I've been reading up on OWIN specs and Katana implementation within .NET. The reason why I'd like to go with the Katana route is because of the owin components associated…
sksallaj
  • 3,872
  • 3
  • 37
  • 58
8
votes
1 answer

Microsoft.Owin.Host.SystemWeb on Mono/XSP

I've managed to get Katana/OWIN running on Mono using the HttpListener host. I'm now experimenting with Microsoft.Owin.Host.SystemWeb on Mono and XSP4. I'm using the code found in the this repo. It has a Startup class: using Owin; namespace…
friism
  • 19,068
  • 5
  • 80
  • 116
7
votes
1 answer

How to add middleware to Owin without IAppBuilder

I'm currently building a library that contains several OWIN-middlewares. These middlewares should be executed in a certain order. In one of the first releases of OWIN, there was the IAppBuilder interface. However the IAppBuilder is not part of OWIN…
Jeroen
  • 1,212
  • 10
  • 24