5

I was working on a webapi project & now we are migrating to owin-katana self hosting. OwinMiddleware behaves in a same way as MessageHandlers. So my question is that, If we are using Owin-katana hosting then do we need to use OwinMiddleware instead of message handlers in webapi ?

Please clarify ?

ggtffg
  • 303
  • 3
  • 20
  • I would have thought you carry on as you are. OWIN is infrastructure & therefore runs below your application. – Simon Halsey Apr 23 '14 at 12:27
  • Ok Thanks. The whole concern was to generate the message handlers per request currently these are running over a global object. Is there any way to achive this with owin katana or using middleware? – ggtffg Apr 23 '14 at 12:51

1 Answers1

0

Yes, you can use replace ASP.NET Web API MessageHandlers with OwinMiddleware. There is a down side... Your MessageHandler code will be dropping down a logical level in the ASP.Net stack, and therefore will not be able to interface with anything directly in the Web API level.

Adrian Toman
  • 11,316
  • 5
  • 48
  • 62