This project has moved and is read-only. For the latest updates, please go here.

Middleware in Microsoft.Owin use non standard method signatures

Nov 21, 2013 at 6:48 PM
Hi, I've been developing an Owin Server implementation ( and I'm having a hard time showing the Welcome Page with Microsoft.Owin.
The trouble is that when I call IAppBuilder.UseWelcomePage() it adds WelcomePageMiddleware to the pipeline, but this class' constructor and Invoke method have non conventional signatures.
What I mean by non conventional is:
  • The constructor requires an object of a class that implements OwinMiddleware as the next middleware.
  • The Invoke method requires an object of a class that implements IOwinContext, an interface that doesn't even implement IDictionary<string, object>.
My IAppBuilder implementation does not know how to handle these signatures. It only knows how to handle Invoke(IDictionary<string, object> context) and ctor(Function<IDictionary<string, object>, Task> next, ...), and I'm thinking it shouldn't know how to handle anything else. Is there something I'm doing wrong or is all middleware here intentionally compatible only with Katana?
Nov 21, 2013 at 7:00 PM