Test URL to see if it is still valid

Discussion in 'ASP .Net' started by teddysnips@hotmail.com, Sep 25, 2008.

  1. Guest

    Part of my current ASP.NET project involves storing URLs. At the time
    of storage, they are checked for correctness (i.e. a new window or tab
    is spawned and the user clicks "Good" or "Bad" depending on whether
    the new window shows the correct site. However, when the user wishes
    to return to that URL at a later date, is there any way of automating
    the process of checking if it is still a good link - i.e. that it
    won't 404 - without actually opening it in a browser window and asking
    the user to validate it. I realise that the content may have changed,
    but I'm more concerned at this stage that the link hasn't broken.

    Thanks

    Edward
     
    , Sep 25, 2008
    #1
    1. Advertising

  2. Guest

    On Sep 25, 2:18 pm, "Aidy" <> wrote:
    > > Part of my current ASP.NET project involves storing URLs.  At the time
    > > of storage, they are checked for correctness (i.e. a new window or tab
    > > is spawned and the user clicks "Good" or "Bad" depending on whether
    > > the new window shows the correct site.  However, when the user wishes
    > > to return to that URL at a later date, is there any way of automating
    > > the process of checking if it is still a good link - i.e. that it
    > > won't 404 - without actually opening it in a browser window and asking
    > > the user to validate it.  I realise that the content may have changed,
    > > but I'm more concerned at this stage that the link hasn't broken.

    >
    > http://msdn.microsoft.com/en-us/library/system.net.httpwebrequest.aspx
    >
    > You want to see the status of the response to ensure it is 200 which means
    > OK, 404 means missing etc.


    Thanks Andy, that looks like a plan!

    Edward
     
    , Sep 25, 2008
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Flip
    Replies:
    3
    Views:
    1,003
    Tony Morris
    Feb 9, 2004
  2. Steve Kershaw
    Replies:
    1
    Views:
    392
    Brennan Stehling
    Sep 26, 2006
  3. Peter L. Berghold
    Replies:
    6
    Views:
    580
  4. Skybuck Flying

    Call oddities: &Test() vs &Test vs Test

    Skybuck Flying, Oct 4, 2009, in forum: C Programming
    Replies:
    1
    Views:
    760
    Skybuck Flying
    Oct 4, 2009
  5. Leif Wessman
    Replies:
    4
    Views:
    102
    Ben Morrow
    Jun 12, 2004
Loading...

Share This Page