views:

725

answers:

2

We're making some calls to some very simple JSON web services in .NET CF 3.5 / Windows Mobile 6 and it appears that we've run into this bug: http://blogs.msdn.com/andrewarnottms/archive/2007/11/19/why-net-compact-framework-fails-to-call-some-https-web-servers.aspx

Is it really almost two years later and this isn't fixed? Seems like a pretty common scenario , calling secure web services from .NET CF 3.5. There has to be some workaround. Anyone know if there is a fix or workaround for this issue?

Here is the code we're using to make the calls:

private string GetJsonResponse(string command, Dictionary<string, string> parameters)
{
    string requestUri = BuildRequestUri(command, parameters);

    HttpWebRequest webRequest = (HttpWebRequest)HttpWebRequest.Create(requestUri);
    webRequest.AllowWriteStreamBuffering = true;

    cookieManager.PublishCookies(webRequest);
    HttpWebResponse webResponse = (HttpWebResponse)webRequest.GetResponse();

    string jsonResponse = string.Empty;

    using (StreamReader streamReader = new StreamReader(webResponse.GetResponseStream()))
    {
        jsonResponse = streamReader.ReadToEnd();
    }

    webResponse.Close();

    return jsonResponse;
}
+1  A: 

There is no released fix for it, no. I believe Microsoft plans a fix for 3.5 to ship with a Platform Builder QFE in the near future, but that has zero benefit for 2.0 users, and I'm not sure how it affects WinMo developers who don't use Platform Builder (they've not made any announcements on a general availability SP release of the CF).

The workarounds are still those outlined in the blog entry you cite. For example, we implemented a whole new SSL-based Socket (including porting an SSL library to the CF) to get around it.

ctacke
oof, thanks for the response. this should be fun.
jspru