0

I'm trying to understand why I have standard endpoints defined in the config file because I'm under the impression that the endpoints I have defined under services should be used. If I comment standard endpoint, then when I run service, I get message "No Endpoint found"

So do I need both? If I do, how standardendpoints are used? Thanks,

<standardEndpoints>
  <webHttpEndpoint>
    <standardEndpoint name="" helpEnabled ="true"
                      automaticFormatSelectionEnabled ="true"></standardEndpoint>
  </webHttpEndpoint>
</standardEndpoints>

<services>
  <service name ="SimRestService" behaviorConfiguration ="MyServiceBehavior">
    <endpoint address="" binding="basicHttpBinding" bindingConfiguration="defaultBasicHttpBinding"
       contract="SimRestServices.ISimRestService" />
  </service>

DeanOC
  • 7,142
  • 6
  • 42
  • 56
saqibm
  • 11
  • 2

1 Answers1

0

Can you also post the service and servicecontract code? I suspect your service is written as a REST service (having [WebGet] and/or [WebInvoke] attributes on your service methods).

REST methods require an endpoint with a webHttpBinding. The endpoint you provide has a basicHttpBinding, so that doesn't apply.

Marc Selis
  • 833
  • 12
  • 17
  • _ _ Sub AddRecord(ByVal ID As String, ByVal data As String) – saqibm Dec 03 '14 at 14:09
  • Your service is indeed a REST service, and as I indicated above that requires a webHttpBinding. If you don't want to add the standard endpoints you should at least alter your service endpoint to use a webHttpBinding instead. – Marc Selis Dec 04 '14 at 09:19
  • My real question was not about webHttpBinding but understanding and use of standardEndpoints as how they are helpful? Like you mentioned that I can add service endpoints with webhttpbinding then where is the use of standardendpoints? – saqibm Dec 05 '14 at 05:22
  • Your question was why you needed to specify the standardEndpoints because otherwise your service didn't work. It tried to explain to you that because your service is a REST service it **needs** an endpoint with a **webHttpBinding**. So either you specify that binding on the endpoint in the endpoints section of the service, or you specify it in the in the standardEnpoints. The standardEndpoints section contains endpoints that are to be shared by **all** services... – Marc Selis Dec 08 '14 at 10:23