WCF bindings, basicHttpBinding, and wsHttpBnding

My WCF never worked with wsbinding, but when I switched to basic it worked fine.

What do I need to do for wsbinding to work?

Update

when I say it didn't work, I mean the client could never use the service endpoints.

Do I need to add username / password?

0


source to share


1 answer


First, are you using Visual Studio 2005 or 2008? Then if you are using VS2005 have you installed the .NET CTP tools for WCF / WF that were released in 2006? I am asking these questions because I want to know how you set up your proxy class in the client. You right clicked and "added a service link" or "added a web link"

Also, is your WCF config file similar to the one below? This shows double setup, both Basic and WsHttp Bindings.



  <system.serviceModel>
    <bindings>
      <wsHttpBinding>
        <binding name="wsHttp">
          <security mode="None">
            <transport clientCredentialType="None" />
            <message clientCredentialType="None" negotiateServiceCredential="false" establishSecurityContext="false" />
          </security>
        </binding>
      </wsHttpBinding>
      <basicHttpBinding>
        <binding name="basicHttp"/>
      </basicHttpBinding>
    </bindings>
    <behaviors>
      <serviceBehaviors>
        <behavior name="NorthwindBehavior">
          <serviceMetadata httpGetEnabled="true" />
          <serviceDebug includeExceptionDetailInFaults="true" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <services>
      <service behaviorConfiguration="NorthwindBehavior" name="SampleApplicationWCF.Library.SupplierService">
        <endpoint binding="wsHttpBinding" bindingConfiguration="wsHttp" name="wsHttpSupplierService" contract="SampleApplicationWCF.Library.ISupplierService" />
      </service>
    </services>
  </system.serviceModel>

      

+1


source







All Articles