I have a WCF service which I want to pass URL strings to. However, whenever it encounters a '%' or '/' character it falls over.
Example from javascript, this works
$.post("http://localhost:15286/Service1.svc/Submit/thor");
But neither of these do:
$.post("http://localhost:15286/Service1.svc/Submit/http://www.google.com");
$.post("http://localhost:15286/Service1.svc/Submit/http:%");
I have a breakpoint in my service and it doesn't even get hit for the last two examples.
I'm new to WCF services so I might just be making a rookie mistake.
WCF Service
[ServiceContract]
public interface IService1
{
[WebInvoke(UriTemplate = "/Submit/{imageURL}")]
[OperationContract]
string Submit(string imageURL);
}
public class Service1 : IService1
{
public string Submit(string imageURL)
{
return String.Format("Thanks, you sent me '{0}'.", imageURL);
}
}
th%20orand let us know the results? I would expect that to resolve toth<space>orserver-side.