Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6950207
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T14:03:50+00:00 2026-05-27T14:03:50+00:00

Here is vb.net 2008 code is: Public Function CheckURL(ByVal URL As String) As Boolean

  • 0

Here is vb.net 2008 code is:

Public Function CheckURL(ByVal URL As String) As Boolean
Try
Dim Response As Net.WebResponse = Nothing
Dim WebReq As Net.HttpWebRequest = Net.HttpWebRequest.Create(URL)
Response = WebReq.GetResponse
Response.Close()
Return True
Catch ex As Exception
End Try
End Function

when a url is processing in checking it hangs my application for a while. Is this possible it checks smoothly all url list without hanging my application..

Is there any other fastest way to check urls?

Note: I have about 800 urls in file to check all links a valid by website responce or not.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T14:03:51+00:00Added an answer on May 27, 2026 at 2:03 pm

    The answer is two fold:

    1. Most of the waiting time is due to downloading content you don’t need. If you request to only return the header, you will receive substantially less data, which will make your process faster.
    2. As Matt identified, you aren’t disposing of your connections, which may slow your process.

    Expanding on Matt’s answer, do the following:

    Try
        Dim WebReq As Net.HttpWebRequest = Net.HttpWebRequest.Create(URL)
        WebReq.Method = "HEAD" 'This is the important line.
        Using Response = WebReq.GetResponse()
            Return True
        End Using
    Catch ex as WebException
        Return False
    End Try
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

It's pretty difficult to show code for ASP.NET here, so I will try my
Here's some C# source code which implements an unmanaged DLL (advapi32). public void AddPrivileges(string
I am trying to add Become-a-Fan button to my 2008 asp.net website (vb) Here
I'm setting up a net.tcp WCF service using instructions here: http://blogs.msdn.com/swiss_dpe_team/archive/2008/02/08/iis-7-support-for-non-http-protocols.aspx One of the
I got some sample code from the net here: http://www.javadb.com/sending-a-post-request-with-parameters-from-a-java-class That works fine. It
I am using VSTS 2008 + C# + .Net 3.5 + ADO.Net. Here is
I'm wring a unit test for a controller and here is my code. public
I saw a similar question asked and answered for ASP.net here How do I
ASP.NET newbie here I have coded up an ASP.NET website and running on win'08
Here: http://freshmeat.net/projects/myperl/ I need to enable PHP in MySQL

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.