Wcf – WSHttpBinding and HTTP and Windows Authentication


I tried to setup WCF service with WSHttpBinding and Windows Authentication and HTTP protocol, not HTTPS. Is it possible? I am using IIS 7. Current my config file is below.

With this config application throws exception:

Could not find a base address that matches scheme http for the
endpoint with binding WSHttpBinding. Registered base address schemes
are [].

My code is:

        <behavior name="WsBehavior">
          <serviceMetadata httpGetEnabled="true" httpsGetEnabled="false" />
          <serviceDebug includeExceptionDetailInFaults="true"/>

      <service behaviorConfiguration="WsBehavior" name="LoginService">
        <endpoint address="" binding="wsHttpBinding" bindingConfiguration="WsBinding" contract="ILoginService">
            <dns value="http://localhost:50001/Ws/" />
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />

    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" minFreeMemoryPercentageToActivateService="1">
        <add prefix="http://localhost:50001/Ws/" />

        <binding name="WsBinding" maxReceivedMessageSize="2147483647">
          <readerQuotas maxDepth="64" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
          <security mode="None">
            <transport clientCredentialType="Windows" />

Best Solution

I got next error

The authentication schemes configured on the host ('IntegratedWindowsAuthentication') do not allow those configured on the binding 'WSHttpBinding' ('Anonymous'). Please ensure that the SecurityMode is set to Transport or TransportCredentialOnly. Additionally, this may be resolved by changing the authentication schemes for this application through the IIS management tool, through the ServiceHost.Authentication.AuthenticationSchemes property, in the application configuration file at the element, by updating the ClientCredentialType property on the binding, or by adjusting the AuthenticationScheme property on the HttpTransportBindingElement.

So answer on my question. It's impossible.