PC Review


Reply
Thread Tools Rate Thread

The chunk length was not valid - Not resolved

 
 
Olivier P.
Guest
Posts: n/a
 
      1st Dec 2003
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






 
Reply With Quote
 
 
 
 
Olivier P.
Guest
Posts: n/a
 
      1st Dec 2003
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


 
Reply With Quote
 
Geoff Schwab [MSFT]
Guest
Posts: n/a
 
      1st Dec 2003
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/p...Q/default.aspx

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

"Olivier P." <désolépasdespam> wrote in message
news:3fcb3a87$0$28639$(E-Mail Removed)...
> 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
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
The chunk length was not valid when reading from stream Thomas Microsoft Dot NET Framework 1 20th Dec 2004 12:07 PM
The chunk length was not valid when reading from stream Thomas Microsoft Dot NET 0 19th Dec 2004 05:54 PM
chunk length was not valid in HttpWebRequest class Eric Larson Microsoft Dot NET Compact Framework 3 5th Dec 2003 06:07 PM
The chunk length was not valid Markus Posch Microsoft Dot NET Compact Framework 3 4th Dec 2003 04:18 PM
HttpWebResponse: Problems reading response stream - The chunk length was not valid exception Young Cho Microsoft Dot NET Compact Framework 8 21st Nov 2003 05:56 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:53 PM.