We are using basicHttpBinding because of SOAP 1.1 requirement.
The configuration we are using is
<system.serviceModel>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true"/>
<diagnostics>
<messageLogging logEntireMessage="true" logMessagesAtServiceLevel
="true"
logMessagesAtTransportLevel ="true"
logMalformedMessages="true"
/>
</diagnostics>
<behaviors>
<serviceBehaviors>
<behavior name="TestServiceBehavior" >
<serviceMetadata httpsGetEnabled="true" />
<serviceCredentials >
<serviceCertificate findValue="someValue"
storeLocation="LocalMachine" storeName="My"
x509FindType="FindBySubjectName" />
<clientCertificate>
<certificate />
</clientCertificate>
</serviceCredentials>
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service behaviorConfiguration="TestServiceBehavior"
name="TestService" >
<endpoint address="" binding="basicHttpBinding"
contract="SomeContract" bindingConfiguration="TestServiceConfig">
<identity>
<dns value="localhost" />
<certificateReference findValue="SomeValue"
storeLocation="LocalMachine"
storeName="My"
x509FindType="FindBySubjectName" />
</identity>
</endpoint>
</service>
</services>
<bindings>
<basicHttpBinding>
<binding name="TestServiceConfig" closeTimeout="00:01:00"
openTimeout="00:01:00"
receiveTimeout="00:10:00" sendTimeout="00:01:00"
allowCookies="false"
bypassProxyOnLocal="false"
hostNameComparisonMode="StrongWildcard"
maxBufferSize="65536" maxBufferPoolSize="524288"
maxReceivedMessageSize="65536"
textEncoding="utf-8" transferMode="Buffered"
messageEncoding="Text"
useDefaultWebProxy="true" >
<readerQuotas maxDepth="32" maxStringContentLength="8192"
maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="TransportWithMessageCredential" >
<transport clientCredentialType="None"
proxyCredentialType="None"
realm="" />
<message clientCredentialType="Certificate"
algorithmSuite="Default" />
</security>
</binding>
</basicHttpBinding>
</bindings>
</system.serviceModel>
And the ServiceContract has ProtectionLevel set as
ProtectionLevel.Sign
We also have a TestClient which uses the proxy generated from svcutil
with the same binding
configuration.
The problem we are facing is that the WCF Client when sends the
request, it signs the time stamp
and not the body and the Response returned by the server is not signed
at all.
In the above context,
1. How do we make our TestClient sign the body instead of timestamp?
2. How to make the Service sign the body of the responses?
3. Is there a CustomBinding configuration which can achive this?