0

I have read several posts (here on SO and on MSDN) that supposedly show how I can have two endpoints for my WCF service. But and I can't seem to get this to work. I tried what they show, but it still does not work.

Here is what I have now:

<system.serviceModel>
  <services>
    <service name="MyServiceProject.MyServiceClass">
      <endpoint address="MyService.svc"
                  binding="basicHttpBinding"
                  bindingName="normalBasicHttpBinding"
                  contract="MyContractsProject.IMyServiceClass" />

        <endpoint address="SecuredMyService.svc"
                  binding="basicHttpBinding"
                  bindingName="secureBasicHttpBinding"
                  contract="MyContractsProject.IMyServiceClass" />
    </service>
  </services>
  <bindings>
      <basicHttpBinding>
          <binding name="normalBasicHttpBinding" maxBufferSize="5242880"
                    maxBufferPoolSize="5242880"
                    maxReceivedMessageSize="5242880">
              <readerQuotas maxArrayLength="16384"
                            maxStringContentLength="5242880" />
          </binding>

        <binding name="secureBasicHttpBinding" maxBufferSize="5242880"
                    maxBufferPoolSize="5242880"
                    maxReceivedMessageSize="5242880">
          <security mode="Transport">
            <transport clientCredentialType="Windows" />
          </security>
          <readerQuotas maxArrayLength="16384"
                        maxStringContentLength="5242880" />
        </binding>
      </basicHttpBinding>
  </bindings>
  <behaviors>
      <serviceBehaviors>
          <behavior>
              <serviceMetadata httpGetEnabled="true" />
              <serviceDebug includeExceptionDetailInFaults="true" />
          </behavior>
      </serviceBehaviors>
  </behaviors>
</system.serviceModel>

Variations on this that I have tried:

  • Taking out the security
  • Having the first address be blank and the second just "secure" then going to http://MyNormalEndpoint/MyService.svc/secure (was blank and WCF Storm could not connect)
  • Adding a <Host> section that is a hard reference to the deploy path. (I don't want to do this as my service has to deploy to several different locations. But it did not work anyway)
  • Having just one endpoint (the secure one)
  • Using two different binding types (wsHttpBinding).

None of these has worked.

And now calls to my normal service are returning 404. (So I have messed something up). If you want to see my original (working) config it can be found here.

Thanks for any help.

Vaccano
  • 78,325
  • 149
  • 468
  • 850

1 Answers1

0

Are you sure you have proper formats for address

Specifying an Endpoint Address

paparazzo
  • 44,497
  • 23
  • 105
  • 176