I would like to use the WCF service hosted on IIS (5/6), with integrated Windows authentication turned on and disabling anonymous access. I tried to do this by running http://msdn.microsoft.com/en-us/library/ff648431.aspx , but getting a message that the certificate is not installed. But I do not need SSL. I don't have clients waiting for older ASMX services, so I don't need to use basicHttpBinding (and it is also unsafe), so I tried using wsHttpBinding.
How do I get wsHttpBinding with windows authentication to work without SSL? This is such a general requirement, but I could not find a solution for this. Can someone send configuration for client and server please? I am using an ASP.NET client.
My configuration is below. and the exact error message:
An error occurred while executing an HTTP request https: //mymachine/WCFTest/Service1.svc . This may be because the server certificate is not configured properly with HTTP.SYS in the case of HTTPS. It can also be caused by a security binding mismatch between the client and server.
I used the svcUtil utility to create a proxy class and configuration for the client.
server:
<system.serviceModel>
<bindings>
<wsHttpBinding>
<binding name="wsHttpEndpointBinding">
<security mode="Transport"/>
</binding>
</wsHttpBinding>
</bindings>
<services>
<service behaviorConfiguration="WCFTest.Service1Behavior" name="WCFTest.Service1">
<endpoint address="" binding="wsHttpBinding" bindingConfiguration="wsHttpEndpointBinding" name="wsHttpEndpoint" contract="WCFTest.IService1"/>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="WCFTest.Service1Behavior">
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
client:
<system.serviceModel>
<bindings>
<wsHttpBinding>
<binding name="wsHttpEndpoint" closeTimeout="00:01:00" openTimeout="00:01:00"
receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false"
transactionFlow="false" hostNameComparisonMode="StrongWildcard"
maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true"
allowCookies="false">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<reliableSession ordered="true" inactivityTimeout="00:10:00"
enabled="false" />
<security mode="Transport">
<transport clientCredentialType="Windows" proxyCredentialType="None"
realm="" />
<message clientCredentialType="Windows" negotiateServiceCredential="true"
establishSecurityContext="true" />
</security>
</binding>
</wsHttpBinding>
</bindings>
<client>
<endpoint address="https://mymachine/WCFTest/Service1.svc"
binding="wsHttpBinding" bindingConfiguration="wsHttpEndpoint"
contract="IService1" name="wsHttpEndpoint">
<identity>
<userPrincipalName value="mymachine\ASPNET" />
</identity>
</endpoint>
</client>
</system.serviceModel>