1

This URI:

http://localhost:50454/api/Bla/Get/50/-2

with this webapi controller action:

Route("Bla/{x:double}/{y:double}")]
[AcceptVerbs("GET")]
[HttpGet]
public IHttpActionResult Bla([FromUri] double x, double y)
{
// ...
}

However, as soon as I start using something like this which contains a comma/dot:

http://localhost:50454/api/Bla/Get/50/-2.1

I get 404 error. Why is this? How can I fix this?

I understand now that I have to use:

http://localhost:50454/api/Bla/Get/50/-2.1/

However, can I change this behavior?

cs0815
  • 16,751
  • 45
  • 136
  • 299

1 Answers1

1

Add a back slash at the end of your url it will work.

Like this given below

http://localhost:50454/api/Bla/Get/50/-2.1/

Prashant
  • 460
  • 3
  • 12