locked
Web service call fails with device that has Windows Mobile 6.5 RRS feed

  • Question

  • We have a mobile device application that calls a webservice using HttpWebRequest, this is running with no problems on devices with windows mobile 6.1.  We have had some new devices from O2 with 6.5 installed (and cf3.5 alongside cf2).  The following line of code now errors with "An error message cannot be displayed because an optional resource assembly containing it cannot be found"

                    using (Stream postStream = request.GetRequestStream())

                    {

                        postStream.Write(byteData, 0, byteData.Length);
                    }

    I have tried installing the resource file to get the actual error message but that hasn't worked so I am left digging around in the dark for a solution.

    I have tried using netcfcfg.exe to force the application to use .net cf2 but still get the same error message.

    Any suggestions on how to resolve this or further troubleshooting ideas would be appreciated.

     

    Regards

    Adrian

     

    Thursday, December 16, 2010 11:25 AM

Answers

  • I'm not sure how to get the actual error message resource, but there are a few things you can check in your code:

     

    Did you set the ContentLength property before calling GetRequestStream()?

    Is the Method property set to "GET" or "HEAD"?

    In short, do any of the exception descriptions seem to apply to your code?

    http://msdn.microsoft.com/en-us/library/d4cek6cc.aspx

     

    -PaulH

    • Marked as answer by Jesse Jiang Thursday, December 30, 2010 6:13 AM
    Thursday, December 16, 2010 2:42 PM