Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default WebClient Problem

    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.




    yysiow Guest

  2. Similar Questions and Discussions

    1. Webclient w/ Proxy
      I have a WebClient.OpenRead that is timing out on some client machines. I believe the problem may be Proxy settings on the client machine. How...
    2. Program freeze when using WebClient
      Hey- I made a program that gets some html and grabs all the URL's thatend with .bin (threw regexp) and pass it to a function i havecalled...
    3. webclient.downloadfile
      I've been toying with an asp.net diretory browser and have been trying to use system.net.webclient.downloadfile as a means to download files from...
    4. DefaultCredentials and WebClient
      I'm trying to make a call inside an ASP.NET web application to an external quasi-web service (aka FrontPage Server Extensions): Dim rpcClient As...
    5. CookieContainer with WebClient
      Any help appreciated ... I am trying to connect to a site that requires authentication through cookies, and be able to navigate through several...
  3. #2

    Default WebClient Problem

    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


    >-----Original Message-----
    >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.
    >
    >
    >
    >
    >.
    >
    Sandeep Alur Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139