route paths ending with '/' not recognized

Topics: Web Api
Sep 5, 2011 at 4:14 AM

Hi there,

I spent a fair amount of time tracking down a problem which turned out to be rather silly.
I was doing a jquery post. The MessageHandler was called, but the request never reached the intended method on my service.

By chance I then realized that If I changed this:

TO 

$.ajax({ url: '/api/addPoints/', ...

 

$.ajax({ url: '/api/addPoints', ...

it then all worked.

Notice the only difference is the trailing '/' in the post url.

It would be good if the framework could catch this one. It can happen very easily and is difficult to spot.

Sep 6, 2011 at 5:27 AM

I was curious about this as well.  Will this be addressed in Preview 5?

Sep 6, 2011 at 4:51 PM

Since no one has replied, I filed it as a 'bug'.

http://wcf.codeplex.com/workitem/68

Vote for it ;-)

Anyone have an idea when Preview 5 will be out? Hopefully it's a RC :-)