I have WebApi baed web service like:
public class ControllerName : ApiController
{
[Route("api/ControllerName/{p1}/{p2}/{p3}/{p4}/{p5}")]
public string GetItemByNameAndId(string p1, string p2, string p3, string p4, string p5)
{
}
}
This type request is working:
host/api/ControllerName/1/2/3/4/5
But I want this type of request:
host/api/ControllerName/&p1=1&p2=2&p3=3&p4=4&p5=5
and I receive error like:
A potentially dangerous Request.Path value was detected from the client (&). Which steps must be followed? Any changes in config files, any attributes etc.
Thanks for your time.