Net.Sockets : PC Portnumber Changes Dynamically In LAN Via (DLINK)router?

Feb 12, 2012

i am creating server/client application using .net.Sockets something like cybercafe software.Im following this example on codeproject Simple Socket Chat Program there is no problem i run it on local pc. But when i run the client in the other pc in network i got a problem.

says :No connection could be made because the target machine actively refused it.

I tried to use netstat -a on cmd and i found out that the portnumbers of all the p.c on our network always changes.Is there any way to do it without using portnumber and just hostname or ipaddress only.

View 1 Replies


ADVERTISEMENT

Can't Get IP From Others Pc's Connected To Router

Feb 16, 2012

i need to create a network map (from any pc). For now i get my own ip, the router ip, but i can't get the IP from others pc's connected to the router. Can i get the IP's only with the framework? or i need another external library? [code]

View 1 Replies

How To Get Router's IP Address

Aug 20, 2005

I'm using the following code and it yields me my computer's private IP address:

Code:Private Sub frmGetIP_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

[Code]...

However, this is NOT what I want. Basically what I'm looking at doing, is using Remote Desktop Connection from Windows XP Professional, but in order to do that, I need to know my IP address. My IP Address is dynamic (it changes).What I'm looking at doing, is building a website that I can log onto with a username and password, that posts my router's IP Address.My question is, how do I programmatically obtain my router's IP address? It's the same address found on [URL].. I tried viewing the website's source but it's not all there.

View 19 Replies

IP Adress Through Router?

Jun 27, 2011

I am having difficulties connecting to a computer through a router. The problem is that when i use an internet web page to get my IPAdress, I get the Ip Adress of my router and what i really need is to get to The Machine that has a server running on it. Is there anyway to get pass the router and connect directly to the machine without using Port Forwarding.

View 4 Replies

Log Into Router With HttpWebRequest?

Jun 27, 2012

How to successfully log into a DSL-Router (Model: Speedport w504v Type A).I wrote a function usinig HttpWebRequest and HttpWebResponse. So far this function is not finished and is only for finding out the right login process.[cde]...

View 1 Replies

Retrieve Router WAN (outside) IP Address?

Sep 23, 2007

I am trying to retrieve the WAN side IP address of my router within a windows form. I am using VS 2005, programming in VB.net, developing a windows application (not a web app).

View 3 Replies

List Up All Connected Pc To Router (wifi )?

Feb 6, 2012

Is there a way to list up all connected pc to my router (wifi )? Even if they arent on same LAN (like ipod touch). Or list list all user that are using internet? Atm I figured out this code :

Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
WebBrowser1.Navigate("http://192.168.15.x/DHCP_Static.asp")[code]....

Which i though was suppose to list connected client but logged on my DS and didnt listed it up. Maybe it doesnt list DS?

View 2 Replies

.net - Block A Website From Accessing Router?

Jul 2, 2011

Im programming in VB.NET and i dont know how to block a website from the router. Something similar to a Patch Blocker or similar to Anon Proxy Server just i need to know how to do this in vb.net. More info: The thing is that i have a ps3 and want it to block certain url from accessing my router.

View 1 Replies

Login To My Router / App With Proper Credentials?

Feb 23, 2011

I need to find a way to login to my router/ap with the proper credentials and read from a designated textbox from the router's page and then virtualy submit some input that I might enter in my program to go as like a textbox.

View 3 Replies

VS 2010 Router Login Via Windows?

Jun 20, 2010

I'm currently making a program that will disable my wireless internet at a certain time and turn it back on at another time.

On my OLD router the login page was built into the webpage itself which made it easy to login via VB code

On my current Sky router they use Windows Security to Login. (Picture below)

Does anyone know how in Vb to automate the login.

View 7 Replies

C# - Get Router Name And IP As Shown In Windows Network Tab (in Code)?

Oct 1, 2010

Basically, if you go to Start and click Computer and then click on the Network link on the left hand side, you'll notice on the right hand side several categories, one of which is titled "Network Infrustructure", in that category, my router is listed, and in my case, it is "LINKSYS WAG160N Wireless-N ADSL2+ Gateway" and when you right-click and select properties, it lists basic info such as internal/gateway IP address, on mine it is "192.168.1.1" I would like to know how to retreive this information in code, preferably a Windows API so that i can call it using a legacy VB6 app. Also, even if you just know a .NET version or a Delphi version, please do list that as well as i can code in both. However, the answer i'm ultimately seeking is a method to access this via VB6 so that would probably be a WinAPI call (will upvote & select this as answer), however, other methods are also welcome incase i can't find a legacy method (i will upvote these).

View 3 Replies

Make A Program To Manage Homehub 2.0 Router?

Jun 24, 2010

I want to make a program to manage my homehub 2.0 router.There's a reset option which requires a piece of script to be run;

<script type="text/javascript">
<![CDATA[
var restartButton = new Button("restart","","Restart my BT Home Hub",function(){restart_ajax();});
]]>
</script>

I think this will cause my router to reset, although I'm not sure.How would I get this to run in a vb.net program?

View 6 Replies

Make A Router Auto-login With Vb6 Winsock

Aug 8, 2011

I have a problem to make a program for autologin my tplink router if I open a connection example : 84.82.1.123 port 80 with winsock (this is my router IP Address ) I can not get my router menu HTML pages. because the router ask for the user name and password How can I send my User Name and Password with this winsock? This Picture was captured when I access 84.82.1.123 with IE How to make an autologin program with winsock to my router?

View 2 Replies

Open Internet Explorer And A Router Using The Ip Then Login

Nov 18, 2009

How would I open internet explorer, open a router using the ip then login. The login it asks for is a popupbox type.

[Code]...

View 2 Replies

Send AT Commands To Router Network Port?

Aug 9, 2010

How can i send AT commands to my router network port?

View 6 Replies

Textbox To Display My Default Router Ip Address?

May 19, 2010

I would like to know is this possible.I have a simple form in vb2008 with a button and textbox when i press the button i would like textbox to display my default router ip address.

View 14 Replies

VS 2008 - TCP Online Chat / Configuring Router

Dec 22, 2011

I've been working on a tcp online chat. I heard that you need to configure your router to allow other pc to connect or something?

Server :
Imports System.Net, System.Net.Sockets
Public Class frmServer
Dim serverSocket As Socket
Dim clientSocket As Socket
[Code] .....

View 8 Replies

DB/Reporting :: MS SQL Cannot Pass Port Forwarding Function On Router

Oct 2, 2008

I have setup a MS SQL server in my computer and enable the sql server to listen to the TCP/IP port 1500. I can use my vb.net program to access to the sql server from another pc within the same LAN by using the following connection string "Data Source=192.168.1.101,1500;Database=ABC;UID=SA;PWD=123;

But if I changed the "192.168.1.101" in the connection string to the IP address that provided by the ISP (i.e.: "Data Source=<IP from ISP>,1500;Database=ABC;UID=SA;PWD=123 the connection string do not work. I have set the port forwarding function in the router as forward all TCP from 1500 port to IP 192.168.1.101. But it don't work neither......

Then I checked the port 1500 with the webpage below: [URL]
It show that the port 1500 is closed! But if I use DMZ function on the router to explose my computer the internet.... the above webpage can checked the port 1500 is opened! And I can successfully connect the sql server with this connection string
"Data Source=<IP from ISP>,1500;Database=ABC;UID=SA;PWD=123;"
Is that the mssql cannot pass the port forwarding function on the router? I have set the port 8080, 21 forward to another IP on the router and it work fine......

View 1 Replies

Checking IP And Port Of Switch / Router That Links To Remote Device

Oct 10, 2009

Our company has setup several remote devices that link to a switch Whenever there are problems on the device, some technicans will replace it using a new one We have a vb program that can automatically update the device setup in our server when technicans replace devices. So we do not need to login and update the setting manually However, our program cannot handle the case that there are more than 1 device that need replacement Therefore, our idea is to retrieve the ip and port of the router/switch that links to remote device using VB.net.

View 2 Replies

Dynamically Creating Methods For Dynamically Created Buttons?

Mar 15, 2011

I have this code.

Code:
Public Class Form1
Dim NPB As Button
Dim x As Integer

[code]....

As you can see, when I open a program from my menu, a new button will be created with text similar to this, "C:Program ". The button it self will not do anything. How can I create the method at the same time the button it is for is created? Also how can I change the text do that it gives me, for example, CCleaner.exe instead of the whole target path?

View 14 Replies

Making A Code That Will Login To A Cisco Router - "if Wait Fails Goto"

Mar 3, 2011

I'm currently making a code that will login to a cisco router, and show the version, then return the version to me. The connection to the cisco router is using telnet, and I'm using Dimac's w3Sockets code to Connect, login, and return data. Reference

But currently I'm having some problems, since the router sometimes need the login typed 2 times, or having a key pressed to update the terminal(telnet),meaning i have to check if it gets logged in or not. But the problem is that using dimac code, i can only wait() and waitFor(), and if it none data comes whilst waiting, it keeps on waiting. Is there away to do like: "if wait fails goto"

I've tryed "on error goto", but since its not a error, but just keeps waiting, that dont work. Also, To locate where it gets stuck I have it write to my textbox everytime it takes a step in the code, but its like the dimac code overtakes vb.net. ex: If i send some text to a textbox in the same sub as the connect code is, and it gets stuck at a wait, it dont even write to the textbox, eventhough the textbox.text command was suppose to execute before the wait().

Code:

Private Sub telnet(ByVal port)

TextBox3.Text = TextBox3.Text & Environment.NewLine & "Telnet func Called" 'Cant execute this if it gets stuck at login below. ??
Try

[CODE]...

View 5 Replies

Reading XML Over Sockets

Feb 17, 2010

I am writing an application which involves reading xml over socket. The messages arrive at socket asynchronously. How can I ensure that data is received in form of complete xml elements, validate received data and which classes will be helpful for me in accomplishing my goal.

View 1 Replies

Using PTP Or NTP Protocol With Sockets?

May 21, 2012

Can i implement PTP (precision time protocol) or NTP (simple network timing) with sockets?

If so, how can i use them to send small packages (4 to 33 bytes) with the smallest delay possible?

P.S. I would prefer to know more about PTP, I've heard that it has smaller delay.

View 1 Replies

.net - Working Of Tcpclient Sockets In .net?

Jun 2, 2011

I have an application in vb.net which will connect with an hardware device and test its functionality. The hardware device basically spits out data continuosly through Ethernet. That is it recieves some data via com ports and spits out the processed data via ethernet.So my application does both. Thats pretty much the entire app.My problem is i am using tcpclient sockets. Now when i connect a tcpclient to the device using

tcpclient.open(ip,port);

Immediately the device sends some data which comes and get stored in the clientsocket. Then i send a command to it ,only then i read the data from the clientsocket using

tcpclient.getstream().read()

at this time the entire data that is the one which flowed immediately when connected to the device and the one that i actually need after passing command is both acquired. This is undesirable. I need the data which i read only after sending the command. So i was wondering if there is any way to clear the tcpclient socket before we do a read. The manual doesnt show any such method.

View 1 Replies

Binding & Connecting Using Sockets?

Sep 29, 2009

Here is an issue with a socket I am having:

Public Sub Connect(ByVal server As String, ByVal port As Integer)
Dim IP As IPAddress = IPAddress.Parse(server)
Dim EP As IPEndPoint = New IPEndPoint(IP, port)

[Code]....

The socket is declared like this, at the top of the code:

Dim sock As Socket

What is wrong here? It says Object reference not set to an instance of an object, which is a NullReferenceException.

View 1 Replies

C# - Sending A String With Sockets?

Aug 20, 2009

I am using Nektra's Deviare to hook winsock's send method calls. My ideia is to learn to also send messages through the same socket than the original application. So what I'm doing is when i detect the first call to send message, I save the socket id(the first argument of the send function), so I can use it later.

So here is my code:

uint socket = 0;
[DllImport("Ws2_32.dll")]
private static extern int send(uint socket, string buf, int len, int flags);

[Code].....

This last messagebox is poping up always -1. Why should be it?

edit: calling WSAGetLastError() returns 2. Which I do not know what it means, as it doesn't seem to appear on msdn.

View 3 Replies

C++ Sending Structs Over Sockets

Aug 25, 2009

i am using vb.net and i would to send some structs to a C++ tcp server.The problem is the structs i am sending might contain other structs.[code]Lets say i want to send FirstStruct over to the C++ Server.

View 2 Replies

Create Sockets And Communicate Over Them?

Mar 4, 2009

I am actually new to VB.net...i have managed to create Sockets and communicate over them..but i dont know how fire sql queries through sockets as they take in Byte data as a input...i want to actually pass queries through sockets and retrive those results...i am using mysql database....i have actually tried changing the connection string (the ip address) for a static network but i think sockets are better for dynamic ip networks.

View 1 Replies

Net.Sockets Wait For Streamwrite?

Nov 25, 2011

Net.Sockets wait for streamwrite?

View 2 Replies

Send Email Using NET Sockets?

Feb 18, 2003

This code will allow you to send Emails using only .NET Sockets. This code was adapted from sample code on[code]...

View 7 Replies







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