Note that there are some explanatory texts on larger screens.

plurals
  1. PO.NET Compact Framework, WCF service, compression and DIGEST authentication
    primarykey
    data
    text
    <p>I'm trying to put a number of features together, which is proving increasingly difficult due to the limitations of the .NET Compact Framework.</p> <p>Specifically, I've got a WCF service and I'm writing a mobile device client for it. The catch? I want to use some sort of data compression (due to a very slow modem connected to said device) and HTTP DIGEST authentication (which is already in place on the site hosting the WCF service).</p> <p>I've followed <a href="http://blogs.msdn.com/b/maagniho/archive/2008/12/24/gzip-message-encoding-for-wcf-applications-written-using-net-compact-framework.aspx" rel="nofollow">this blog entry</a> to get the compression and generated code needed for the WCF service client.</p> <p>I am, however, struggling with the HTTP DIGEST. I've no idea how to add this functionality.</p> <p>Previously I didn't use compression and as such I connected to the WCF service using SOAP, using a simple WebService reference, and to add HTTP DIGEST I had to override the <code>GetWebRequest</code> method and add the required headers manually. This time around the generated classes seem to give very little leeway and there isn't much I can override. Also, all security or authentication parameters seem to be designed for SSL, rather than such basic authentication schemes.</p> <p>To summarize: how can I create a WCF client using compression and HTTP DIGEST authentication using .NET Compact Framework?</p> <p>EDIT: Here's the code I've currently got:</p> <pre><code> System.ServiceModel.Channels.CustomBinding customBinding = new System.ServiceModel.Channels.CustomBinding(); CompressionMessageEncodingBindingElement compressionBindingElement = new CompressionMessageEncodingBindingElement(); customBinding.Elements.Add(compressionBindingElement); HttpTransportBindingElement httpBindingElement = new HttpTransportBindingElement(); customBinding.Elements.Add(httpBindingElement); EndpointAddress endPoint = new EndpointAddress("http://localhost:5100/Service.svc"); ServiceClient client = new ServiceClient(customBinding, endPoint); </code></pre> <p>I suspect I somehow need to add the HTTP DIGEST functionality to the <code>CustomBinding</code> class, but I don't know how.</p> <p>I suspect I should also note, that while I am using .NET Compact Framework 3.5, I am creating a Windows CE application. As such, I didn't bother downloading Windows Mobile 6 SDKs. If these SDKs add more functionality which can be used in Window CE applications and are required for the HTTP DIGEST to work, please let me know.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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