WebClient Problem

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

Sandeep Alur

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
 

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

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top