title: MessageSecurityException: The security header element 'Timestamp' with the '' id must be signed
body: <p>I'm asking the same question here that I've already asked on msdn forums <a href="http://social.msdn.microsoft.com/Forums/en-US/netfxnetcom/thread/70f40a4c-8399-4629-9bfc-146524334daf" rel="nofollow noreferrer">http://social.msdn.microsoft.com/Forums/en-US/netfxnetcom/thread/70f40a4c-8399-4629-9bfc-146524334daf</a></p>
  
  <p>I'm consuming a (most likely Java based) Web Service with I have absolutely no access to modify. It won't be modified even though I would ask them (it's a nation wide system).</p>
  
  <p>I've written the client with WCF. Here's some code:</p>
  
  <pre><code>CustomBinding binding = new CustomBinding();
  AsymmetricSecurityBindingElement element = SecurityBindingElement.CreateMutualCertificateDuplexBindingElement(MessageSecurityVersion.WSSecurity10WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11BasicSecurityProfile10);
  element.AllowSerializedSigningTokenOnReply = true;
  element.SetKeyDerivation(false);
  element.IncludeTimestamp = true;
  element.KeyEntropyMode = SecurityKeyEntropyMode.ClientEntropy;
  element.MessageProtectionOrder = System.ServiceModel.Security.MessageProtectionOrder.SignBeforeEncrypt;
  element.LocalClientSettings.IdentityVerifier = new CustomIdentityVerifier();
  element.SecurityHeaderLayout = SecurityHeaderLayout.Lax;
  element.IncludeTimestamp = false;
  
  binding.Elements.Add(element);
  binding.Elements.Add(new TextMessageEncodingBindingElement(MessageVersion.Soap11, Encoding.UTF8));
  binding.Elements.Add(new HttpsTransportBindingElement());
  
  EndpointAddress address = new EndpointAddress(new Uri("url"));
  
  ChannelFactory&lt;MyPortTypeChannel&gt; factory = new ChannelFactory&lt;MyPortTypeChannel&gt;(binding, address);
  
  ClientCredentials credentials = factory.Endpoint.Behaviors.Find&lt;ClientCredentials&gt;();
  
  credentials.ClientCertificate.Certificate = myClientCert;
  credentials.ServiceCertificate.DefaultCertificate = myServiceCert;
  credentials.ServiceCertificate.Authentication.CertificateValidationMode = X509CertificateValidationMode.None;
  
  service = factory.CreateChannel();
  </code></pre>
  
  <p>After this every request done to the service fails in client side (I can confirm my request is accepted by the service and a sane response is being returned)</p>
  
  <p>I always get the following exception</p>
  
  <blockquote>
    <p>MessageSecurityException: The security
    header element 'Timestamp' with the ''
    id must be signed.</p>
  </blockquote>
  
  <p>By looking at trace I can see that in the response there really is a timestamp element, but in the security section there is only a signature for body.</p>
  
  <p>Can I somehow make WCF to ingore the fact Timestamp isn't signed?</p>