As dthrasher mentioned, move id to the query part of the URI. This worked for me:
[OperationContract]
[WebGet(UriTemplate = "/foo?id={id}")]
string GetFoo(int id);
See “URI scheme” on wikipedia for more info about the different parts of a URI:
http://en.wikipedia.org/wiki/URI_scheme
More Related Contents:
- How to Consume WCF Service with Android
- WCF Service Returning “Method Not Allowed”
- Reports in SOA (Business Intelligence & Service Oriented Architecture)
- Web Services — WCF vs. ASMX (“Standard”)
- WCF – How to Increase Message Size Quota
- A reference to the dll could not be added
- Maximum array length quota
- Difference between web reference and service reference?
- How do you configure WCF known types programmatically?
- ASMX Web Service slow first request
- Contract-First SOA: Designing Business Domain: WCF
- Is .NET Remoting really deprecated?
- Bypass invalid SSL certificate errors when calling web services in .Net
- WCF: Exposing readonly DataMember properties without set?
- How to prevent Visual Studio from launching WcfSvcHost.exe while debugging?
- Calling a webservice that uses ISO-8859-1 encoding from WCF
- Does .Net 4.5 support XML 1.1 yet (for characters invalid in XML 1.0)?
- replace WCF built-in JavascriptSerializer with Newtonsoft Json.Net json serializer
- Best way to support “application/x-www-form-urlencoded” post data with WCF?
- Any way to make DataContractJsonSerializer serialize Dictionaries properly?
- WCF Error “Maximum number of items that can be serialized or deserialized in an object graph is ‘65536’”
- WCF service startup error “This collection already contains an address with scheme http”
- WCF Disable Deserialization Order Sensitivity
- Service reference not generating client types
- Get SOAP Message before sending it to the WebService in .NET
- How to set keep alive interval for HTTP connection in WCF
- What’s the best way to jSON serialize a .NET DataTable in WCF?
- Client configuration to consume WCF JSON web service
- WCF sessions with a wsHttpBinding and without windows security
- Web Service without adding a reference?