Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I have a REST web service which has a method like this:

[OperationContract]
[WebInvoke(Method = "GET", ResponseFormat = WebMessageFormat.Xml,
  BodyStyle = WebMessageBodyStyle.Bare,
  UriTemplate = "?T={TransmissionReference}&ID={CustomerId}")]
ResponseArray DoLookup(string TransmissionReference, string CustomerId);

In my web.config file, I have set up a service:

<services>
  <service name="PropertyWS.Service">
    <endpoint address="http://localhost:51173/Service.svc/DoLookup"
              behaviorConfiguration="webBehavior"
              binding="webHttpBinding"
              bindingConfiguration="webHttpBindingConfig"
              bindingNamespace="urn:mdWebServiceProperty"
              contract="PropertyWS.IService"
              name="PropertyWSRESTEndpoint"/>
  </service>
</services>

However, this is clumsy, as it forces my IIS guy to 'fix' the endpoint address when he installs it to IIS. Ideally, I want my WebInvoke's UriTemplate to be:

/DoLookup?T={TransmissionReference}&ID={CustomerId}

and my web.config endpoint address to be "". This works for the XML and SOAP versions of the same web service, but not for REST. Instead I get an "Endpoint not Found" WCF page.

share|improve this question
add comment

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.