I have a WCF REST Based Service method with URL of two parameters
/GetProduct/{productid}/*{format}
Format expects "xml" to give output in xml and if nothing is provided it returns in JSON. The issue is if enter format as "xml" or any string equal to more than 2 characters, it breaks with an exception "Length cannot be less than zero. Parameter name: length"
If I give just one characters like "x" it works. This is quite strange. Any insights in this.
Operation Contract
[WebGet(ResponseFormat= WebMessageFormat.Json , BodyStyle = WebMessageBodyStyle.Wrapped, UriTemplate = "GetProduct/{productid}/{*format}")]
Product GetProduct(String productid, String format);