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
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