WebRequest method in VB.Net

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mothi Kannan

    WebRequest method in VB.Net

    I tried to validate url links
    i.e.1, "www.harvestads depot.com/nytjobs/outgoing/8667835.h
    tm"

    with the below coding
    ----------------------
    Dim myRequest As HttpWebRequest = HttpWebRequest. Create
    ("http://www.harvestadsd epot.com/nytjobs/outgoing/8667835.
    htm")
    Dim myResponse As HttpWebResponse = myRequest.GetRe sponse
    ()
    myResponse.Clos e()

    but I got "Invalid URI: The format of the URI could not
    be determined" error, but the link is exist

    can any of you help me, how to validate those links
  • Herfried K. Wagner [MVP]

    #2
    Re: WebRequest method in VB.Net

    * "Mothi Kannan" <Mothikannan.Ra ghu@Revitsys.co m> scripsit:[color=blue]
    > I tried to validate url links
    > i.e.1, "www.harvestads depot.com/nytjobs/outgoing/8667835.h
    > tm"
    >
    > with the below coding
    > ----------------------
    > Dim myRequest As HttpWebRequest = HttpWebRequest. Create
    > ("http://www.harvestadsd epot.com/nytjobs/outgoing/8667835.
    > htm")
    > Dim myResponse As HttpWebResponse = myRequest.GetRe sponse
    > ()
    > myResponse.Clos e()
    >
    > but I got "Invalid URI: The format of the URI could not
    > be determined" error, but the link is exist[/color]

    The code above works for my like a charm (.NET 1.0, Windows XP
    Professional SP1).

    --
    M S Herfried K. Wagner
    M V P <URL:http://dotnet.mvps.org/>
    V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

    Comment

    Working...