title: WCF - How do I encrypt messages?
body: <p>My WCF service involves the sending of a dataset (in csv format) data between client and service. This dataset must be encrypted so that the data cannot be intercepted. I'm using wshttpbinding and trying to encrypt the message by using the following settings in web.config:</p>
  
  <pre><code>&lt;wsHttpBinding&gt;
    &lt;binding name="wsHttp"&gt;
      &lt;reliableSession enabled="true" /&gt; 
      &lt;security mode="Message"&gt;
        &lt;message clientCredentialType="UserName" algorithmSuite="TripleDes" /&gt;
      &lt;/security&gt;
    &lt;/binding&gt;
  &lt;/wsHttpBinding&gt;
  </code></pre>
  
  <p>When I try and generate a client proxy I get a long error messagebox (which cannot be completely read because it goes off the bottom of the screen!). The error message does mention something about a "service certificate not being provided".</p>
  
  <p>How do I encrypt a message? Do I need a certificate? I should mention that this service will be used over the internet from different domains so I'm not sure whether using "Username" security is the best option (?)</p>
  
  <p>Basically I'm confused!</p>