Check If Port Is Alive?

Sep 18, 2011

I am working in Visual Basic 2010 and need to check if a port is alive on an ip.I am currently using this code

If My.Computer.Network.Ping("85.250.180.71") Then
TextBox2.Text = "Server Online"
Else
TextBox2.Text = "Server Offline"
End If

View 7 Replies


ADVERTISEMENT

VS 2010 Check If SQL Connection Is Alive?

Aug 1, 2011

if i go to sql server configuration manager and shutdown the SQL server, the server will be down.

How do i detect for those changes using vb.

Public Sub CheckConnection()
Dim con As New SqlConnection
Dim objCmd As New SqlCommand

[Code]....

I cant make those work because the connection opens and close. WHat i want is to check if the server is alive or dead.

View 1 Replies

Keep A Thread Alive?

Oct 17, 2010

What is the best way to keep a thread alive

View 1 Replies

Check If A Port Is Open On A Particular IP Address?

Nov 24, 2011

I have an application which need to send data to particular system on specific port. But the application gets hang if the target system port is closed.

I Want to know if a particular Port is open on a specific IP address so that i can continue my next task. PBL (Visual Studio 2010 Ultimate)

View 11 Replies

Check If A Port Is Open Using Sockets?

Feb 16, 2010

I have written some code to check if a port is open. I'm currently trying to work with the system.net.sockets name space.I know that the easy way out would be to use AxWinsock, but I don't think the AxWinSock is very cool, nor do I think it's very professional when trying to make network applications in VB.NET.

I've got this Error message : Socket Exception Was unhandled, No connection could be made because the target machine actively refused it 127.0.0.1:1 IDK, Like I said, I'm new to the System.net.sockets namespace, I'm pretty good with other stuff in VB.NET, but when it comes to the serious stuff like the system.net.sockets namespace, I'm not so great.look at this code and tell me what I am doing wrong, I've manged to get this far, and I don't want to just give up and continue watching my movie.

[Code]....

View 3 Replies

Check Or Map If Parallel Port Is Mapped?

May 31, 2010

i want to work with it in vb. 1st i want to check if port is already mapped or not, if not then map it and once done remove the mapping. The one way is using shell and pass command in it, but not sure how to get already map status and also wondering if there is any other method to get it done.n :)

View 1 Replies

Check State Of Serial Port?

Jan 8, 2011

I am very new to this but i have with alote of help maked a program that comunicates with a relay board over rs232.

[code]...

View 2 Replies

Check To See If A Serial Port Even Exists?

Feb 9, 2010

I'd like to check to see if a serial port even exists. I know that if it doesn't, there is an error thrown when you do a port.open So, I would imagine that doing a simple IF port.isopen won't work?I looked at all the methods on the class and don't see anything obvious on how to do it.I just want to see if the hardware exists on the PC and set a boolean variable if it does when the form loads.

View 3 Replies

How To Make Animated Gif Alive

Jun 9, 2009

I was trying to show an waiting icon when processing a time consuming operation (to let user know something is running behind), but no sure what's the good way to do it? for example, i have a picture box holding this animated Gif, and initially i set it to be invisible, but I want to show it and actually working (alive) when clicking a button, this button will trigger a do loop ending after 1min. [code]

View 17 Replies

Check If Port Is Blocked By Windows Firewall?

Aug 15, 2011

How do i check if specific port is blocked by Windows firewall , both in incoming and outgoing connections.

I've seen code samples such as this one:

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs)
Dim host As String = "localhost"
Dim port As Integer = 6900

[Code]....

But how can i know if the exception is thrown specifically because of firewall blocking, and not because of other socket errors?

View 1 Replies

Server Checker - Check The Status Of A IP And Port?

Dec 17, 2011

I am in need of a way to check the status of a IP and Port. I've been looking around all day and still haven't found the correct thing.

View 8 Replies

VS 2010 Check If A Specific Port Is Open?

Jul 13, 2010

I want to check if a specific TCP Port of an IP address is open.

How can I realise that?

View 12 Replies

Keep Object Alive For Threadpool / Timercallback?

Jun 4, 2009

When using teh system.threading.timer or threading.threadpool. queueuserworkitem, you are able to pass an object.

But wouldn't the garbage collector destroy the object even before the callback can be executed?[code]...

View 2 Replies

Keeping Database Connection Alive?

Nov 22, 2010

I have an application that connects to an SQL Server, sometimes we have a networkinterruption of min 10secs during the openconnection , I get a General Network Error when I try to carry out any procedure that communicates with the database afterthe interruption. Even when the connection is closed and reopened, I still get General Network Error. The only way to get the application to function again is to close the Application and reopen it, is there any way I can keep the connection alive?

View 11 Replies

VS 2008 Winsock Can't Keep Connection Alive

Jan 3, 2010

I am trying to make a basic server/client program but I ran in a problem.

[Code]....

When I click connect in the GUI the first state of sock.ctlstate is 6 , connecting then the connected event is triggered and after that the sock.ctlstate is 8 , "Peer is closing the connection". But I dont understand why it does this. I should keep the connection alive to communicate.

View 1 Replies

Check If Port Exist In Firewall Exceptions List?

Oct 20, 2009

I need to check if port exist in the firewall list I am currently using this piece of code to check if port 80 exist do something if it doesn't then add it. This works fine but I feel It should be cleaner[code]...

View 1 Replies

Check When Serial Port Has Stopped Receiving Data?

Dec 20, 2009

What I am doing is creating an app to send and receive CNC programs to machine tools via the RS232 interface. At the moment I am testing the software with 2 laptops linked together through a cable I have made up. which all works. I have added a serial port to my form 1 and using the code below I can send and receive data. However with the send button I can open the comm port send the data and then close the comm port (No Problems there). With the receive button I want to open the comm port receive the data and close the comm port. The problem I have is checking when the app has finished receiving data so I can then close the comm port

Private Sub Btn_Send_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btn_Send.Click
Try

[Code]....

View 2 Replies

Check Serial Port Data Received Event Status?

Oct 2, 2009

I am trying to write something through serial port to my device. Before that, I added the data received handler to read the data when the device response with some data. The problem now is how can i check the status of the data received event? I need to know when the data received event has started or has ended before I can proceed to do some other task like check if the result is successfully receive.

View 2 Replies

Check If String, Which Receive Via A Serial Port Matches To A String In A Database (access)?

Jun 22, 2010

I got an app, which receives data via a R232 port, convert it to a string and on the other side I got a database, where the strings are saved. How can I find a way to compare the string with all strings in one database column and get back the another stringform the same row in this database. I never programmed a database

View 1 Replies

Setup - LAN Keep-alive Proxy - "Home Or Small Office Network" Via The Control Panel To Access The Internet

Apr 15, 2012

I'm trying to setup sort of a LAN keep-alive proxy...Ex.: My Xbox 360 is connected strait to my computer via an ethernet cable. My computer is connected to the internet via a Wi-Fi adapter. Everything works fine and I can access the internet on the Xbox and computer.

Issue: Every time I start my Xbox I have to set up a "Home or Small Office Network" via the control panel to access the internet. What I would like to do is implement a proxy that when I shutdown the Xbox the LAN doesn't give the "Network Cable Unplugged" notification. I wasn't sure if there was a way to make the connection stay open for so long after it should say unplugged. Such as if I need to restart the system and don't want to have to re-setup the network on the computer.

This is my code to retrieve the network info:

Imports System.Net
Imports System.Net.NetworkInformation

Module Module1

[CODE]...

View 4 Replies

Read The Data From Barcode Weight Scales By Serial Port And TcpIp Port?

Nov 27, 2010

I'm mohammed from Oman ,I'm visual studio.net programmer How I can Read the Data From Barcode Weight scales By Serial port and TcpIp port

View 7 Replies

Get FullName From Available Serial Port (Com Port) From Device Manager In Windows Form With .net?

Jul 25, 2011

I have a Windows form.in windows form have a combo box that give me a list of available port serial with it code (Dim ports As String() =SerialPort.GetPortNames())for example( Com1,Com8,Com15,...).but I want to give me fullname of serial port in device manager for example in dvice manager is these (Comunication Port(COM1) - Printer Port(LPT1) And USB Serial Port(COM8)).how to Get it?

View 2 Replies

Detect The Address And Port Number Of The Parallel Port In Computer?

Jun 9, 2010

I would like to detect the Address and Port number of the Parallel Port in computer.

View 4 Replies

The Given Port Name Does Not Start With COM/com Or Does Not Resolve To A Valid Serial Port?

Aug 2, 2011

If I uninstall the COM1 and reboot, it works. If I shut down (power off) and restart, I get the message below. If I uninstall then click on Scan for Hardware Changes,The given port name does not start with COM/com or does not resolve to a valid serial port. Parameter name:portName

View 8 Replies

Communications :: .net MSComm Port USB 4 Port Relay?

Oct 20, 2011

I am trying to get my 4 port USB relay board to work in VB.net using the COM PORT. I found some code from a poster who has the 16 port USB relay version. When trying his code i can only get it to turn on relays 1-3 all at the same time. The product can be found here: USB 4 port relay

"01+//" - Relay 1 is switched ON
"01-//" - Relay 1 is switched OFF
"02+//" - Relay 2 is switched ON
"02-//" - Relay 2 is switched OFF

[code].....

So i am confused as to how to separate each relay out with that code above and just be able to turn on any number 1-4 relay on or off independently from each other!

View 1 Replies

MSComm Port USB 4 Port Relay

Oct 20, 2011

I am trying to get my 4 port USB relay board to work in VB.net using the COM PORT. I found some code from a poster who has the 16 port USB relay version. When trying his code i can only get it to turn on relays 1-3 all at the same time. The product can be found here: USB 4 port relay I was following what the guy in the post was doing to turn his on:

[Code]...

View 6 Replies

Communications :: Serial Port - Run Program, "Access To The Port 'COM1' Is Denied"?

Oct 15, 2008

Im having problem with the Serial Port. When i run my program, "Access to the port 'COM1' is denied". What does that mean? Im not sure whats happening because theres no error in my code. Someone suggest me to use 'COM2'. Which is also the same result. I have a microcontroller, programmed and run it. And i need to capture the data onto my vb, which is on a multiline textbox. How to i do that?Just to double check my code?

[code]...

View 1 Replies

Reading Serial Port Read Data From Serial Port?

Aug 16, 2011

i am a absolute beginner and i want to use vb to receive data from micro controller through serial port using rs232 standards, i found this code to receive the data serially, can any one tell me where should i paste this code, so that the data received will be displayed in message box.Private Sub DataReceived(ByVal sender As System.Object, ByVal e As System.IO.Ports.SerialDataReceivedEventArgs) HandlesSerialPort1.DataReceived

[Code]...

View 9 Replies

Serial Port Example Code - Connect To A Modem Thru The Serial Port

Oct 26, 2011

The link below has code to connect to a modem thru the serial port but it is for an earlier version of VB. when I convert the code, it does not fully convert and has 4 errors that prevent building the project. can someone tell me what needs to be changed or added?

[URL]

Note: the error: not CLS-Compliant

View 8 Replies

Get USB Control For The USB Port Communication? Like The SerialPort Control For The COM Port

Jul 17, 2009

Do someone know if there is a\\ USB control for the USB port communication? like the SerialPort control for the COM port.

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved