Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>If the client is running on the .NET Compact Framework 3.5, you can use WCF to invoke the service and use the built-in support for HTTP Digest authentication without requiring SSL.</p> <p>Here's how to programmatically configure a WCF client to use Digest authentication with the <a href="http://msdn.microsoft.com/en-us/library/system.servicemodel.basichttpbinding%28v=vs.95%29.aspx" rel="nofollow">BasicHttpBinding</a>:</p> <pre><code>var binding = new BasicHttpBinding(); binding.Security.Mode = BasicHttpSecurityMode.TransportCredentialOnly; binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Digest; var endpoint = new EndpointAddress("http://server/myservice"); var client = new MyServiceClient(binding, endpoint); // We have to set the actual credentials on the client proxy object // before invoking the service: client.ClientCredentials.HttpDigest.ClientCredential.UserName = "me"; client.ClientCredentials.HttpDigest.ClientCredential.Password = "password"; try { client.MyServiceOperation(); client.Close(); } catch { client.Abort(); } </code></pre> <p><strong>Related resources:</strong></p> <ul> <li><a href="http://blogs.msdn.com/b/andrewarnottms/archive/2007/08/21/the-wcf-subset-supported-by-netcf.aspx" rel="nofollow">The WCF subset supported by the .NET Compact Framework 3.5</a></li> <li><a href="http://wcfguidanceformobile.codeplex.com/" rel="nofollow">WCF Guidance for Mobile Developers (see page 66 for HTTP Digest Authentication)</a></li> </ul>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload