Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. http webrequest

http webrequest

Scheduled Pinned Locked Moved C#
htmlcomsysadminhelp
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    TAREQ F ABUZUHRI
    wrote on last edited by
    #1

    when i try to get this link http://www.yellowpages.com.au/qld/gatton/a-12000029-listing.html[^] using HttpWebRequest request = (HttpWebRequest)WebRequest.Create(link); request.AllowAutoRedirect = true; HttpWebResponse response = (HttpWebResponse)request.GetResponse(); Stream resStream = response.GetResponseStream(); StreamReader objSR; objSR = new StreamReader(resStream, System.Text.Encoding.GetEncoding("utf-8")); string sResponse = objSR.ReadToEnd(); i don't get any response from server please help why this happen

    Palestine

    realJSOPR 1 Reply Last reply
    0
    • T TAREQ F ABUZUHRI

      when i try to get this link http://www.yellowpages.com.au/qld/gatton/a-12000029-listing.html[^] using HttpWebRequest request = (HttpWebRequest)WebRequest.Create(link); request.AllowAutoRedirect = true; HttpWebResponse response = (HttpWebResponse)request.GetResponse(); Stream resStream = response.GetResponseStream(); StreamReader objSR; objSR = new StreamReader(resStream, System.Text.Encoding.GetEncoding("utf-8")); string sResponse = objSR.ReadToEnd(); i don't get any response from server please help why this happen

      Palestine

      realJSOPR Offline
      realJSOPR Offline
      realJSOP
      wrote on last edited by
      #2

      Put a try/catch block around your code, and run it under the debugger so you can see why you're not getting a response.

      ".45 ACP - because shooting twice is just silly" - JSOP, 2010
      -----
      You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
      -----
      "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups