Click here to Skip to main content
       

Visual Basic

 
GeneralRe: How to update Gridview with value textbox = Null PinmemberEddy Vluggen17-Oct-12 5:51 
GeneralRe: How to update Gridview with value textbox = Null Pinmemberzaimah17-Oct-12 6:25 
GeneralRe: How to update Gridview with value textbox = Null Pinmemberzaimah17-Oct-12 7:04 
GeneralRe: How to update Gridview with value textbox = Null PinmemberEddy Vluggen17-Oct-12 10:20 
AnswerRe: [SOLVED] How to update Gridview with value textbox = Null PinmemberjosephSurgeon31-Oct-12 5:27 
QuestionIndex was outside the bounds of the array [modified] Pinmemberetteychan12-Oct-12 20:03 
AnswerRe: Index was outside the bounds of the array PinmvpRichard MacCutchan12-Oct-12 22:07 
QuestionConfused by my own code: LINQ FirstOrDefault PinmemberSteven St. John11-Oct-12 14:18 
AnswerRe: Confused by my own code: LINQ FirstOrDefault PinmemberSteven St. John16-Oct-12 7:58 
QuestionVB.NET Parameters error PinmemberDiego Carrion11-Oct-12 5:12 
AnswerRe: VB.NET Parameters error PinmemberSimon_Whale11-Oct-12 5:45 
GeneralRe: VB.NET Parameters error PinmemberDiego Carrion11-Oct-12 5:47 
GeneralRe: VB.NET Parameters error PinmemberChandraRam11-Oct-12 12:06 
QuestionSlow Ping and not guaranteed success PinmemberHerboren10-Oct-12 6:44 
I work for an ISP strictly for small business and minimal residential. We provide different services as well as web hosting. We have to convert web domains to an IP once a month from a list.
 
I am trying to recreate an app in VB.net and it takes forever for ping result to come back as true or flase and when I transl;ate the host into an IP it doesnt get an IP for the host even though it exists. Here is a sample picture of my compiled app running:
 
http://postimg.com/87000/what-86552.jpg[^]
 
my code in vb.net:
 
Imports System
Imports System.Net
Imports System.IO
 

Public Class Form1
    Dim reachable As Boolean = False
    Dim IPEntry As IPHostEntry
    Dim ReadAllLinesArray() As String
 

 

    Public Function IsDestinationRechable(ByVal hostOrAddress As String)
        Try
            reachable = My.Computer.Network.Ping(hostOrAddress)
        Catch pingException As System.Net.NetworkInformation.PingException
        Catch genericNetworkException As System.Net.NetworkInformation.NetworkInformationException
            'Fail silently and return false
        End Try
        Return reachable
    End Function
 
    Public Sub GetPingAndIPv4()
        Try
 
            For Each s As String In ReadAllLinesArray
                Try
                    IPEntry = Dns.GetHostByName(s)
                    If IsDestinationRechable(IPEntry.AddressList(0).ToString) = True Then
                        Dim lsv As ListViewItem = lsvHostItemList.Items.Add(s)
                        lsv.SubItems.Add(IPEntry.AddressList(0).ToString)
                        lsv.SubItems.Add(IsDestinationRechable(reachable))
                       
                        tssProgressBar.PerformStep()
                    Else
                        Dim lsv As ListViewItem = lsvHostItemList.Items.Add(s)
                        lsv.SubItems.Add("n/a")
                        lsv.SubItems.Add(IsDestinationRechable(reachable))
                        tssProgressBar.PerformStep()
                    End If
                Catch ex As Exception
                End Try
            Next
 
        Catch ex As Exception
 
        End Try
    End Sub
 
    Private Sub OpenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles OpenToolStripMenuItem.Click
        If OpenOldHostsFile.ShowDialog = Windows.Forms.DialogResult.OK Then
            ReadAllLinesArray = File.ReadAllLines(OpenOldHostsFile.FileName)
            tssProgressBar.Maximum = ReadAllLinesArray.Count
        End If
    End Sub
 
    Private Sub SaveToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles SaveToolStripMenuItem.Click
        If SaveNewHostsFile.ShowDialog = Windows.Forms.DialogResult.OK Then
 
        End If
    End Sub
 
    Private Sub ExitToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles ExitToolStripMenuItem.Click
        End
    End Sub
 
    Private Sub RunToolStripMenuItem1_Click(sender As Object, e As EventArgs) Handles RunToolStripMenuItem1.Click
        GetPingAndIPv4()
    End Sub
 
My code isn't complete I am trying to get the main functionality working correctly first.
AnswerRe: Slow Ping and not guaranteed success PinmvpDave Kreskowiak10-Oct-12 9:13 
GeneralRe: Slow Ping and not guaranteed success PinmemberHerboren10-Oct-12 12:33 
GeneralRe: Slow Ping and not guaranteed success PinmvpDave Kreskowiak10-Oct-12 14:01 
GeneralRe: Slow Ping and not guaranteed success PinmemberHerboren10-Oct-12 17:20 
GeneralRe: Slow Ping and not guaranteed success PinmvpDave Kreskowiak11-Oct-12 0:50 
GeneralRe: Slow Ping and not guaranteed success PinmemberEddy Vluggen15-Oct-12 2:19 
QuestionFunction Not Found From Dll Component PinmemberAmbiguousName10-Oct-12 2:57 
AnswerRe: Function Not Found From Dll Component PinmemberEddy Vluggen11-Oct-12 1:08 
GeneralRe: Function Not Found From Dll Component PinmemberAmbiguousName12-Oct-12 2:07 
GeneralRe: Function Not Found From Dll Component PinmemberEddy Vluggen12-Oct-12 2:25 
GeneralRe: Function Not Found From Dll Component PinmemberAmbiguousName12-Oct-12 2:54 
GeneralRe: Function Not Found From Dll Component PinmemberEddy Vluggen12-Oct-12 3:10 
QuestionBlank Asp webpage. PinmemberMember 94936398-Oct-12 1:08 
AnswerRe: Blank Asp webpage. PinmemberCloud Cray8-Oct-12 8:49 
GeneralRe: Blank Asp webpage. Pinmembermiss7869-Oct-12 2:14 
GeneralRe: Blank Asp webpage. PinmvpDave Kreskowiak9-Oct-12 2:51 
GeneralRe: Blank Asp webpage. PinmvpDave Kreskowiak9-Oct-12 2:55 
GeneralRe: Blank Asp webpage. Pinmembermiss7869-Oct-12 4:54 
QuestionQuestion about variables in Classic ASP VBScript PinmemberDiego Carrion7-Oct-12 6:32 
AnswerRe: Question about variables in Classic ASP VBScript PinmemberZac Greve7-Oct-12 7:10 
GeneralRe: Question about variables in Classic ASP VBScript PinmemberDiego Carrion7-Oct-12 7:19 
GeneralRe: Question about variables in Classic ASP VBScript PinmemberWes Aday7-Oct-12 7:38 
GeneralRe: Question about variables in Classic ASP VBScript PinmemberDiego Carrion7-Oct-12 8:02 
GeneralRe: Question about variables in Classic ASP VBScript PinmemberChandraRam7-Oct-12 21:55 
GeneralRe: Question about variables in Classic ASP VBScript PinmemberDiego Carrion8-Oct-12 3:20 
GeneralRe: Question about variables in Classic ASP VBScript PinmemberChandraRam8-Oct-12 3:23 
GeneralRe: Question about variables in Classic ASP VBScript PinmemberDiego Carrion8-Oct-12 3:26 
GeneralRe: Question about variables in Classic ASP VBScript PinmemberZac Greve7-Oct-12 7:39 
GeneralRe: Question about variables in Classic ASP VBScript PinmvpDave Kreskowiak7-Oct-12 9:15 
GeneralRe: Question about variables in Classic ASP VBScript PinmemberDiego Carrion7-Oct-12 10:25 
GeneralRe: Question about variables in Classic ASP VBScript PinmvpDave Kreskowiak7-Oct-12 11:11 
GeneralRe: Question about variables in Classic ASP VBScript PinmemberDiego Carrion7-Oct-12 11:23 
Questionerror Pinmemberuday87227-Oct-12 4:22 
AnswerRe: error PinmvpRichard MacCutchan7-Oct-12 5:47 
GeneralRe: error PinmvpOriginalGriff7-Oct-12 6:44 
GeneralRe: error PinmvpRichard MacCutchan7-Oct-12 7:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web03 | 2.8.1411023.1 | Last Updated 27 Nov 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid