The chunk length was not valid - Not resolved

  • Thread starter Thread starter Olivier P.
  • Start date Start date
O

Olivier P.

Hello,

First of all, I apologize in advance, as English is not my first language.

Here's my issue :

I'm beginner with .Net and compact framework and I'm trying to write a small
application who is supposed to retrieve some XML datas from a website and
store them to a file. To do that, I use the following code :

--------------------------------------------
HttpWebRequest downloadRequest = null;
downloadRequest = (HttpWebRequest)WebRequest.Create"URL");
downloadRequest.ProtocolVersion = HttpVersion.Version10;

HttpWebResponse downloadResponse = (HttpWebResponse)
downloadRequest.GetResponse();
Stream Fichier_Stream = downloadResponse.GetResponseStream();

Encoding encode = System.Text.Encoding.GetEncoding("ascii");
StreamReader readStream = new StreamReader( Fichier_Stream, encode );
String text = readStream.ReadToEnd();

Fichier_Stream.Close();
readStream.Close();
-----------------------------------------------

the part regarding the creation of the file is Ok. I encounter some issue
regarding the httpwebRequest.

Under the emulator, it works sometimes, but not always... the error message
I have is "The chunk length was not valid.". That's why I have try to use
downloadRequest.ProtocolVersion = HttpVersion.Version10;
But I only retrieve a blank page in this case... If I set it to Version11,
it works "sometimes"... I have read a lot of article about this problem in
Google, but I have no idea of how to solve it as the trick of Http version
doesn't work.

Under my true Device, the error is not the same, I have just : "Could not
find resource assembly". I precise that my device is an Axim 5 (Dell).

If somebody could help me, it will be greatly appreciated !

Thanks in advance to you all,
Cheers,

Olivier
 
Hi again,

Finally, I have found the SP2 for compact framework and installed it on my
device : It works like a champ !

But now, how to upgrade the emulator in visual Studio ?

Thanks in advance,

Olivier
 
Hi Olivier,

To install SP2 on the emulator, simply copy the file netcf.all.wce4.X86.cab
to the emulator and run it on the emulator. This file is located in the
desktop installation directory of the service pack, C:\Program
Files\Microsoft .NET Compact Framework 1.0 SP2 by default.

--
Geoff Schwab
Program Manager
Excell Data Corporation
http://msdn.com/mobility
http://msdn.microsoft.com/mobility/prodtechinfo/devtools/netcf/FAQ/default.aspx

This posting is provided "AS IS" with no warranties, and confers no rights.
 
Back
Top