RE: Katana and ASP.NET MVC together

1,162 views
Skip to first unread message

Chris R

unread,
Feb 7, 2013, 2:12:56 PM2/7/13
to net-http-a...@googlegroups.com
OWIN can co-exist with MVC via the Asp.Net routing table, but there is no fail-over option.

owin:HandleAllRequests is the opposite of co-existing.


Date: Thu, 7 Feb 2013 08:57:25 -0800
From: yog...@alebo.de
To: net-http-a...@googlegroups.com
Subject: Katana and ASP.NET MVC together

I am searching for a way to integrate OWIN via Katana into an existing ASP.NET MVC project.

I already played around with the configuration option "owin:HandleAllRequests", but had no success. When a request comes in I want it to be handled by the part of the application which uses owin first. If it cannot be handled by the OWIN part, it should be processed by ASP.NET MVC. Is there any way to do this with Katana?

Thanks in advance.

--
You received this message because you are subscribed to the Google Groups ".NET HTTP Abstractions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to net-http-abstrac...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Alebo

unread,
Feb 18, 2013, 6:11:00 AM2/18/13
to net-http-a...@googlegroups.com
Would this be technically possible though? Could the OwinHttpHandler be modified to support fail-over? From my point of view this would make the integration with existing applications much easier. 

Chris R

unread,
Feb 18, 2013, 11:56:52 AM2/18/13
to net-http-a...@googlegroups.com
Not to my knowledge, though if someone knows more about Asp.Net routing please pipe in here.  The more fundamental question is can you do route fail-over with any existing components?  The only means I've seen is via client or server side redirects (RedirectToRoute).  If there is no infrastructure for other HttpHandlers to do fail-over, then OwinHttpHandler can't do it either.


Date: Mon, 18 Feb 2013 03:11:00 -0800
From: yog...@alebo.de
To: net-http-a...@googlegroups.com
Subject: Re: Katana and ASP.NET MVC together

Louis DeJardin

unread,
Feb 20, 2013, 3:40:17 PM2/20/13
to net-http-a...@googlegroups.com

It would only be possible if your owin pipeline was (a) called from an HttpModule and (b) ran in its entirety before the event that the routing module hooks. But yeah, could be done, if the response is unaltered the rest of the request handling would occur as if nothing happened.

Louis DeJardin

unread,
Mar 25, 2013, 11:56:01 AM3/25/13
to .NET HTTP Abstractions
Good news - I think we'll be getting this to work in Katana 1.1 - it
helps a lot if you want to write things like authn middleware.

On Feb 20, 1:40 pm, Louis DeJardin <lodej...@microsoft.com> wrote:
> It would only be possible if your owin pipeline was (a) called from an HttpModule and (b) ran in its entirety before the event that the routing module hooks. But yeah, could be done, if the response is unaltered the rest of the request handling would occur as if nothing happened.
>
> From: net-http-a...@googlegroups.com [mailto:net-http-a...@googlegroups.com] On Behalf Of Chris R
> Sent: Monday, February 18, 2013 8:57 AM
> To: net-http-a...@googlegroups.com
> Subject: RE: Katana and ASP.NET MVC together
>
> Not to my knowledge, though if someone knows more about Asp.Net routing please pipe in here.  The more fundamental question is can you do route fail-over with any existing components?  The only means I've seen is via client or server side redirects (RedirectToRoute).  If there is no infrastructure for other HttpHandlers to do fail-over, then OwinHttpHandler can't do it either.
>
> ________________________________
> Date: Mon, 18 Feb 2013 03:11:00 -0800
> From: yog...@alebo.de<mailto:yog...@alebo.de>
> To: net-http-a...@googlegroups.com<mailto:net-http-a...@googlegroups.com>
> Subject: Re: Katana and ASP.NET MVC together
>
> Would this be technically possible though? Could the OwinHttpHandler be modified to support fail-over? From my point of view this would make the integration with existing applications much easier.
>
> Am Donnerstag, 7. Februar 2013 20:12:56 UTC+1 schrieb Chris Ross:
> OWIN can co-exist with MVC via the Asp.Net routing table, but there is no fail-over option.http://katanaproject.codeplex.com/SourceControl/changeset/view/98f457...
>
> owin:HandleAllRequests is the opposite of co-existing.
> ________________________________
> Date: Thu, 7 Feb 2013 08:57:25 -0800
> From: yog...@alebo.de<mailto:yog...@alebo.de>
> To: net-http-a...@googlegroups.com<mailto:net-http-a...@googlegroups.com>
> Subject: Katana and ASP.NET<http://ASP.NET> MVC together
> I am searching for a way to integrate OWIN via Katana into an existing ASP.NET<http://ASP.NET> MVC project.
>
> I already played around with the configuration option "owin:HandleAllRequests", but had no success. When a request comes in I want it to be handled by the part of the application which uses owin first. If it cannot be handled by the OWIN part, it should be processed by ASP.NET<http://ASP.NET> MVC. Is there any way to do this with Katana?
>
> Thanks in advance.
>
> --
> You received this message because you are subscribed to the Google Groups ".NET HTTP Abstractions" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to net-http-abstrac...@googlegroups.com<mailto:net-http-abstrac...@googlegroups.com>.
> For more options, visithttps://groups.google.com/groups/opt_out.
>
> --
> You received this message because you are subscribed to the Google Groups ".NET HTTP Abstractions" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to net-http-abstrac...@googlegroups.com<mailto:net-http-abstrac...@googlegroups.com>.
> For more options, visithttps://groups.google.com/groups/opt_out.

Eric Hexter

unread,
Mar 25, 2013, 1:06:56 PM3/25/13
to net-http-a...@googlegroups.com
that sounds promising

Alebo

unread,
Mar 5, 2014, 8:24:53 AM3/5/14
to net-http-a...@googlegroups.com
Is a fallback to ASP.NET MVC possible with the most recent version of Katana? If so, how would this work? Can the Stage Markers as described in http://www.asp.net/aspnet/overview/owin-and-katana/owin-middleware-in-the-iis-integrated-pipeline be used for that scenario? Which event does ASP.NET MVC use for it's routing?

Chris R

unread,
Mar 5, 2014, 10:45:40 AM3/5/14
to net-http-a...@googlegroups.com

Fallback? You mean a fall-though?  Yes, if none of the middleware handle the request then it will automatically fall through to Asp.Net / IIS.  The stage markers should work fine in this scenario, except that you may need to use stages at MapHandler or earlier to ensure Asp.Net / IIS doesn’t take over the request too soon.

 

From: net-http-a...@googlegroups.com [mailto:net-http-a...@googlegroups.com] On Behalf Of Alebo
Sent: Wednesday, March 5, 2014 5:25 AM
To: net-http-a...@googlegroups.com
Subject: Re: Katana and ASP.NET MVC together

 

Is a fallback to ASP.NET MVC possible with the most recent version of Katana? If so, how would this work? Can the Stage Markers as described in http://www.asp.net/aspnet/overview/owin-and-katana/owin-middleware-in-the-iis-integrated-pipeline be used for that scenario? Which event does ASP.NET MVC use for it's routing?

--

You received this message because you are subscribed to the Google Groups ".NET HTTP Abstractions" group.

Reply all
Reply to author
Forward
0 new messages