Quantcast
Channel: ASP.NET MVC / Web API / Web Pages
Viewing all articles
Browse latest Browse all 7925

New Post: UseWebApi and UseHttpMessageHandler doesn't call next OWIN's middleware other than 404

$
0
0
aliostad wrote:
OWIN spec says that OWIN middleware's are called in the order they are defined. If I use UseWebApi or UseHttpMessageHandler which in turn use HttpMessageHandlerAdapter, next middleware is not called unless middleware returns 404.

First of all, this is not according to my understanding of OWIN middleware. So if this behaviour correct, please point me to where this behaviour is described.
The standard behaviour of owin middleware is not specifically defined anywhere. It is entirely up to each middle component to decide whether to call the next step in the pipeline or not.
The problem is, implementing a common "DelegatingHandler" that can be shared among applications and is implemented as an OWIN middleware is impossible by the route of UseWebApi or UseHttpMessageHandler. I am trying to plugin CacheCow as an OWIN middleware and hoped to be able to use UseHttpMessageHandler.

Any ideas?

I believe, there must be a parameter that you could control how "calling next" behaviour is defined, not just by the way of 404.
Reasonable request. Nancy does this, for example.

Viewing all articles
Browse latest Browse all 7925

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>