Single, Catch-all Handler

Topics: Web Api
Nov 26, 2010 at 7:42 AM

How would I define a single, catch-all handler? I've tried several combinations of WebGet, WebInvoke, OperationContract, etc, but I haven't found what I'm looking for. I'm wanting to delegate actual routing to a service.

Coordinator
Nov 26, 2010 at 8:10 AM
I believe if you use WebInvoke and set both UriTemplate and Method to *, then it will be a catch all.

On Nov 25, 2010, at 11:44 PM, "riles01" <notifications@codeplex.com> wrote:

From: riles01

How would I define a single, catch-all handler? I've tried several combinations of WebGet, WebInvoke, OperationContract, etc, but I haven't found what I'm looking for. I'm wanting to delegate actual routing to a service.

Read the full discussion online.

To add a post to this discussion, reply to this email (wcf@discussions.codeplex.com@discussions.codeplex.com)

To start a new discussion for this project, email wcf@discussions.codeplex.com@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com

Nov 27, 2010 at 1:28 AM

Thanks, Glenn. After trying a few more things, I believe I've found that the actual problem is that I am trying to return an HttpResponseMessage. I can return a string, but not the HttpResponseMessage. The only way directly accessing an HttpResponseMessage appears to work is by accepting it in as an additional parameter. Is that correct? I thought we were able to return an HttpResponseMessage out of the service method.

Ryan

Nov 27, 2010 at 1:40 AM

I also cannot get [WebInvoke(UriTemplate = "*", Method = "*")] to pick up all routes. I was able to get [WebGet(UriTemplate = "*")] to pick up any GET request and additional methods for other supported HTTP methods. Not a biggie. The ability to return an HttpResponseMessage is a bigger deal.

Coordinator
Nov 27, 2010 at 2:10 AM
Currently only the param is supported but with the next drop we should support both.

Sent from my Windows Phone

From: riles01
Sent: Friday, November 26, 2010 5:41 PM
To: Glenn Block
Subject: Re: Single, Catch-all Handler [wcf:236106]

From: riles01

I also cannot get [WebInvoke(UriTemplate = "*", Method = "*")] to pick up all routes. I was able to get [WebGet(UriTemplate = "*")] to pick up any GET request and additional methods for other supported HTTP methods. Not a biggie. The ability to return an HttpResponseMessage is a bigger deal.

Read the full discussion online.

To add a post to this discussion, reply to this email (wcf@discussions.codeplex.com@discussions.codeplex.com)

To start a new discussion for this project, email wcf@discussions.codeplex.com@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com

Nov 27, 2010 at 6:31 PM

And when will the next drop be?