WebHttpBinding in WCF: how to configure it the proper way?
Trying to follow this example to make it work: http://weblogs.asp.net/kiyoshi/archive/2008/10/08/wcf-using-webhttpbinding-for-rest-services.aspx

Here is my <code>App.config</code>:

      <system.serviceModel>
        <services>      
          <!-- The service for the TEST WEB client -->
          <service name="MyServer.AAServiceType" behaviorConfiguration="Default">
            <endpoint contract="<MyServer.AAIContractName" binding="webHttpBinding" address="testservice" behaviorConfiguration="webBehavior"/>
            <host>
              <baseAddresses>
                <add baseAddress="http://localhost:8787/" />
              </baseAddresses>
            </host>
          </service>
        </services>
    
        <behaviors>
          <serviceBehaviors>
            <!-- TEST WEB BEHAVIOR -->
            <behavior name="Default">
              <serviceMetadata httpGetEnabled="true"/>
            </behavior>
          </serviceBehaviors>
    
          <!-- TEST WEB ENDPOINT -->
          <endpointBehaviors>
            <behavior name="webBehavior">
              <webHttp />
            </behavior>
          </endpointBehaviors>
          
        </behaviors>
      </system.serviceModel>

The problem is that when I am trying to connect to 8787 port (using <code>putty</code>, for instance) the <i>"Connection refused"</i> error is returned. As you can see, I've also tried to put the wrong names in contract class and service implementation and got no exceptions. What am I doing wrong, please?
WebHttpBinding in WCF: how to configure it the proper way?
===

Trying to follow this example to make it work: http://weblogs.asp.net/kiyoshi/archive/2008/10/08/wcf-using-webhttpbinding-for-rest-services.aspx

Here is my <code>App.config</code>:

      <system.serviceModel>
        <services>      
          <!-- The service for the TEST WEB client -->
          <service name="MyServer.AAServiceType" behaviorConfiguration="Default">
            <endpoint contract="<MyServer.AAIContractName" binding="webHttpBinding" address="testservice" behaviorConfiguration="webBehavior"/>
            <host>
              <baseAddresses>
                <add baseAddress="http://localhost:8787/" />
              </baseAddresses>
            </host>
          </service>
        </services>
    
        <behaviors>
          <serviceBehaviors>
            <!-- TEST WEB BEHAVIOR -->
            <behavior name="Default">
              <serviceMetadata httpGetEnabled="true"/>
            </behavior>
          </serviceBehaviors>
    
          <!-- TEST WEB ENDPOINT -->
          <endpointBehaviors>
            <behavior name="webBehavior">
              <webHttp />
            </behavior>
          </endpointBehaviors>
          
        </behaviors>
      </system.serviceModel>

The problem is that when I am trying to connect to 8787 port (using <code>putty</code>, for instance) the <i>"Connection refused"</i> error is returned. As you can see, I've also tried to put the wrong names in contract class and service implementation and got no exceptions. What am I doing wrong, please?