WebClient 1.1 raise an error-the 1.0 version didnt --???

C

Crirus

Hello!
Last year I used Framework's 1.0 WebControl to connect to a server designed
by me with sockets and TCP.
The client run in a html as activex.
Right now, I reactivated that project... server and client is the same as
last ones
Server send data oj to IE browser
Client upload data ok to my server
Client download data ok from a html apache server
Client make ok request to my server but got a WebRequest exception in some
inner WebRequest method called CheckFinal if I remember good.
So, what they did to the WebClient lately...
All I could figure out is some special http format that WebClient require
and when I send only a word without any http involved, he crash on parsing
the response...or something like he cant figure out if all data arrived so
the DownloadData dont return in time

Any thoughts?
Regards,

Crirus
 
C

Crirus

Happy hello!:)

You can shoot me and I still dont know how I solved this problem but seems
that it is soved.

The WebClient class allways try to parse a response accordingly to http
protocol, not that I dont like some flag that should make the class to
ignore the response format.
Anyway, for a proper use a server allways have to send this:

'header part
myResponse.Append("HTTP/1.1 200 Ok" + vbCrLf)
myResponse.Append(vbCrLf)

'and after that the real usefull response added
myResponse.Append("this is the plain text response from server")

I have to add the fact that I used this and failed, but maybe I forget a
vbcrlf or something..anyway this is the way it work...
MS try to make the classes too smart sometime

Regards, Crirus
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top