WebClient Problem

  • Thread starter Thread starter yysiow
  • Start date Start date
Y

yysiow

hi,

i using WebClient to get the website.
like
string URL = "http://127.0.0.1/index.htm";
WebClient client = new WebClient();
Stream data = client.OpenRead(URL);
StreamReader reader = new StreamReader(data);

is no problem, if i change the URL to

"http://127.0.0.1:3838/index.htm"

(add one port ) and the message is the server committed an HTTP protocal
violation.

so how can i sol this problem..

thanks.
 
It looks like the communication has to happen via Port 80
and no other port when communicating using HTTP Protocol.
Have you created a separate web site other than the
default website as mentioned in the URI.

Thanks,
Sandeep Alur
 
Back
Top