ERR - WebClient.DownloadData returns "protocol violation"

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

ERR - WebClient.DownloadData returns "protocol violation"

Please help,

I'm getting a "protocol violation" from a site that is working perfectly
fine when I issue WebClient.DownloadData as such:

WebClient WebClient_Temp = new WebClient();
byte[] zbyteTemp = WebClient_Temp.DownloadData
(
"http://MySite/MyWebPage.htm"
);

I have heard of the app.config file fix, but my app is a UserControl, and as
such, I can not keep the "MyApp.dll.config" in the smae directory. What can I
do? Is there not any hard code way to FORCE this error to be ignored. And for
that matter, I really do not want the WebClient to parse the output. I want
to get it RAW. now parsing. What can one do?
 
ATS said:
ERR - WebClient.DownloadData returns "protocol violation"

Please help,

I'm getting a "protocol violation" from a site that is working
perfectly fine when I issue WebClient.DownloadData as such:

WebClient WebClient_Temp = new WebClient();
byte[] zbyteTemp = WebClient_Temp.DownloadData
(
"http://MySite/MyWebPage.htm"
);

I have heard of the app.config file fix, but my app is a UserControl,
and as such, I can not keep the "MyApp.dll.config" in the smae
directory. What can I do? Is there not any hard code way to FORCE
this error to be ignored. And for that matter, I really do not want
the WebClient to parse the output. I want to get it RAW. now parsing.
What can one do?

One would have to look at the HTTP traffic between client and server.
Does the web site serve simple static content (like your sample)
suggests, or is it a web application?

Cheers,
 

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

Back
Top