<p>We are setting up a new SharePoint for which we don't have a valid SSL certificate yet. I would like to call the Lists web service on it to retrieve some meta data about the setup. However, when I try to do this, I get the exception:</p>

<blockquote>
  <p>The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.</p>
</blockquote>

<p>The nested exception contains the error message:</p>

<blockquote>
  <p>The remote certificate is invalid according to the validation procedure.</p>
</blockquote>

<p>This is correct since we are using a temporary certificate.</p>

<p>My question is: how can I tell the .Net web service client (<em>SoapHttpClientProtocol</em>) to ignore these errors? </p>

The approach I used when faced with this problem was to add the signer of the temporary certificate to the trusted authorities list on the computer in question.
I normally do testing with certificates created with CACERT, and adding them to my trusted authorities list worked swimmingly.
Doing it this way means you don't have to add any custom code to your application and it properly simulates what will happen when your application is deployed. As such, I think this is a superior solution to turning off the check programmatically.